Skip to content

Commit e4b3d17

Browse files
committed
Fix error in int64 README example
It had scale set to 4, instead of 8. This _was_ a bug in the actual code as well, but it was fixed in the code and not in the README.
1 parent 610e019 commit e4b3d17

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

examples/mem/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ each int64 is 8 bytes wide.
118118
int64Base := Load(Param("i").Base(), GP64())
119119
int64Offset := Load(Param("offset"), GP64())
120120

121-
int64Data := Mem{Base: int64Base, Index: int64Offset, Scale: 4}
121+
int64Data := Mem{Base: int64Base, Index: int64Offset, Scale: 8}
122122
int64Byte := GP64()
123123
MOVQ(int64Data, int64Byte)
124124

@@ -132,7 +132,7 @@ each int64 is 8 bytes wide.
132132
TEXT ·Int64FromSlice(SB), NOSPLIT, $0-40
133133
MOVQ i_base+0(FP), AX
134134
MOVQ offset+24(FP), CX
135-
MOVQ (AX)(CX*4), AX
135+
MOVQ (AX)(CX*8), AX
136136
MOVQ AX, ret+32(FP)
137137
RET
138138
```

0 commit comments

Comments
 (0)