aboutsummaryrefslogtreecommitdiff
path: root/test/codegen
diff options
context:
space:
mode:
Diffstat (limited to 'test/codegen')
-rw-r--r--test/codegen/memcombine.go15
1 files changed, 15 insertions, 0 deletions
diff --git a/test/codegen/memcombine.go b/test/codegen/memcombine.go
index 6e0132744c..8143b6bed5 100644
--- a/test/codegen/memcombine.go
+++ b/test/codegen/memcombine.go
@@ -377,6 +377,11 @@ func store_le64_idx2(dst []byte, d, length, offset int) []byte {
return dst
}
+func store_le64_idx_const(b []byte, idx int) {
+ // amd64:`MOVQ\s\$123, \(.*\)\(.*\*1\)$`
+ binary.LittleEndian.PutUint64(b[idx:], 123)
+}
+
func store_le64_load(b []byte, x *[8]byte) {
_ = b[8]
// amd64:-`MOV[BWL]`
@@ -402,6 +407,11 @@ func store_le32_idx(b []byte, x uint32, idx int) {
binary.LittleEndian.PutUint32(b[idx:], x)
}
+func store_le32_idx_const(b []byte, idx int) {
+ // amd64:`MOVL\s\$123, \(.*\)\(.*\*1\)$`
+ binary.LittleEndian.PutUint32(b[idx:], 123)
+}
+
func store_le16(b []byte, x uint16) {
// amd64:`MOVW\s`
// arm64:`MOVH`,-`MOVB`
@@ -418,6 +428,11 @@ func store_le16_idx(b []byte, x uint16, idx int) {
binary.LittleEndian.PutUint16(b[idx:], x)
}
+func store_le16_idx_const(b []byte, idx int) {
+ // amd64:`MOVW\s\$123, \(.*\)\(.*\*1\)$`
+ binary.LittleEndian.PutUint16(b[idx:], 123)
+}
+
func store_be64(b []byte, x uint64) {
// amd64/v1,amd64/v2:`BSWAPQ`,-`SHR.`
// amd64/v3: `MOVBEQ`