return a[0:na]
}
-// countGeneric actualy implements Count
+// countGeneric actually implements Count
func countGeneric(s, sep []byte) int {
n := 0
// special case
// SI: data
// BX: data len
// AL: byte sought
-// This require the POPCNT instruction
+// This requires the POPCNT instruction
TEXT ·countByte(SB),NOSPLIT,$0-40
MOVQ s+0(FP), SI
MOVQ s_len+8(FP), BX
func TestPos(t *testing.T) {
// TODO(gri) Once we have a general tree walker, we can use that to find
- // the first occurence of the respective node and we don't need to hand-
+ // the first occurrence of the respective node and we don't need to hand-
// extract the node for each specific kind of construct.
testPos(t, decls, "package p; ", "",
limit := test.limit
if runtime.Compiler == "gccgo" {
// gccgo does not yet do escape analysis.
- // TOOD(iant): Remove this when gccgo does do escape analysis.
+ // TODO(iant): Remove this when gccgo does do escape analysis.
limit = test.gccgoLimit
}
numRuns := 100
// basic type (because basic types are pre-declared in the Universe
// scope, outside any package scope), and so is any type name with
// a different name than the name of the basic type it refers to.
- // Additionaly, we need to look for "byte" and "rune" because they
+ // Additionally, we need to look for "byte" and "rune" because they
// are aliases but have the same names (for better error messages).
return obj.pkg != nil || t.name != obj.name || t == universeByte || t == universeRune
case *Named:
LVX (R4+off112),V23
ADD $128,R4 // bump up to next 128 bytes in buffer
- VXOR V16,V8,V16 // xor in inital CRC in V8
+ VXOR V16,V8,V16 // xor in initial CRC in V8
next:
BC 18,0,first_warm_up_done
// Note: To compensate the division by x^32, use the vector unpack
// instruction to move the leftmost word into the leftmost doubleword
// of the vector register. The rightmost doubleword is multiplied
- // with zero to not contribute to the intermedate results.
+ // with zero to not contribute to the intermediate results.
// T1(x) = floor( R(x) / x^32 ) GF2MUL u
var divisionSignsTests = []struct {
x, y int64
q, r int64 // T-division
- d, m int64 // Euclidian division
+ d, m int64 // Euclidean division
}{
{5, 3, 1, 2, 1, 2},
{-5, 3, -1, -2, -2, 1},
func idnaASCII(v string) (string, error) {
// TODO: Consider removing this check after verifying performance is okay.
// Right now punycode verification, length checks, context checks, and the
- // permissable character tests are all omitted. It also prevents the ToASCII
+ // permissible character tests are all omitted. It also prevents the ToASCII
// call from salvaging an invalid IDN, when possible. As a result it may be
// possible to have two IDNs that appear identical to the user where the
// ASCII-only version causes an error downstream whereas the non-ASCII
args := os.CommandLineToArgv(exe + cmd)
out, err := osexec.Command(args[0], args[1:]...).CombinedOutput()
if err != nil {
- t.Fatalf("runing %q failed: %v\n%v", args, err, string(out))
+ t.Fatalf("running %q failed: %v\n%v", args, err, string(out))
}
if want, have := fmt.Sprintf("%q", args), string(out); want != have {
t.Errorf("wrong output of executing %q: have %q want %q", args, have, want)
gobble_mem_fwd_loop:
PREFETCHNTA 0x1C0(SI)
PREFETCHNTA 0x280(SI)
- // Prefetch values were choosen empirically.
+ // Prefetch values were chosen empirically.
// Approach for prefetch usage as in 7.6.6 of [1]
// [1] 64-ia-32-architectures-optimization-manual.pdf
// http://www.intel.ru/content/dam/www/public/us/en/documents/manuals/64-ia-32-architectures-optimization-manual.pdf
// Add a single label.
ctx = WithLabels(ctx, Labels("key", "value"))
- // Retreive it with Label.
+ // Retrieve it with Label.
v, ok := Label(ctx, "key")
if !ok || v != "value" {
t.Errorf(`Label(ctx, "key"): got %v, %v; want "value", ok`, v, ok)
// in external linking, glibc jumps to main with argc in R4
// and argv in R5
- // initalize REGSB = PC&0xffffffff00000000
+ // initialize REGSB = PC&0xffffffff00000000
BGEZAL R0, 1(PC)
SRLV $32, R31, RSB
SLLV $32, RSB
cmd := exec.Command(exe)
out, err := cmd.CombinedOutput()
if err != nil {
- b.Fatalf("runing main.exe failed: %v\n%s", err, out)
+ b.Fatalf("running main.exe failed: %v\n%s", err, out)
}
}
}