diff --git a/README.md b/README.md index 9d49c0fd..27a18066 100644 --- a/README.md +++ b/README.md @@ -106,12 +106,12 @@ func main() { s := GP64() XORQ(s, s) LABEL("loop") - CMPQ(n, operand.Imm(0)) - JE(operand.LabelRef("done")) - ADDQ(operand.Mem{Base: ptr}, s) - ADDQ(operand.Imm(8), ptr) + CMPQ(n, Imm(0)) + JE(LabelRef("done")) + ADDQ(Mem{Base: ptr}, s) + ADDQ(Imm(8), ptr) DECQ(n) - JMP(operand.LabelRef("loop")) + JMP(LabelRef("loop")) LABEL("done") Store(s, ReturnIndex(0)) RET() diff --git a/examples/fnv1a/README.md b/examples/fnv1a/README.md index 3ceb8b38..62ed5046 100644 --- a/examples/fnv1a/README.md +++ b/examples/fnv1a/README.md @@ -15,22 +15,22 @@ func main() { ptr := Load(Param("data").Base(), GP64()) n := Load(Param("data").Len(), GP64()) - h := reg.RAX - MOVQ(operand.Imm(OffsetBasis), h) + h := RAX + MOVQ(Imm(OffsetBasis), h) p := GP64() - MOVQ(operand.Imm(Prime), p) + MOVQ(Imm(Prime), p) LABEL("loop") - CMPQ(n, operand.Imm(0)) - JE(operand.LabelRef("done")) + CMPQ(n, Imm(0)) + JE(LabelRef("done")) b := GP64() - MOVBQZX(operand.Mem{Base: ptr}, b) + MOVBQZX(Mem{Base: ptr}, b) XORQ(b, h) MULQ(p) INCQ(ptr) DECQ(n) - JMP(operand.LabelRef("loop")) + JMP(LabelRef("loop")) LABEL("done") Store(h, ReturnIndex(0)) RET() diff --git a/examples/sum/README.md b/examples/sum/README.md index 53260ca0..d2a5984d 100644 --- a/examples/sum/README.md +++ b/examples/sum/README.md @@ -12,12 +12,12 @@ func main() { s := GP64() XORQ(s, s) LABEL("loop") - CMPQ(n, operand.Imm(0)) - JE(operand.LabelRef("done")) - ADDQ(operand.Mem{Base: ptr}, s) - ADDQ(operand.Imm(8), ptr) + CMPQ(n, Imm(0)) + JE(LabelRef("done")) + ADDQ(Mem{Base: ptr}, s) + ADDQ(Imm(8), ptr) DECQ(n) - JMP(operand.LabelRef("loop")) + JMP(LabelRef("loop")) LABEL("done") Store(s, ReturnIndex(0)) RET()