Add const_addr instruction

This new instruction calculates the effective address of a constant in the constant pool using LEA (x86).
This commit is contained in:
Andrew Brown
2020-03-20 14:15:47 -07:00
parent fa35d88878
commit 65856987cd
4 changed files with 44 additions and 0 deletions

View File

@@ -19,3 +19,11 @@ block0:
[-, %xmm3] v1 = vconst.i32x4 const43 ; bin: 0f 10 1d 00000011 PCRelRodata4(31)
return
}
function %address_of_vconst() {
const42 = i32x4 [1 0 0 0]
block0:
[-, %rax] v0 = const_addr.i64 const42 ; bin: 48 8d 05 00000001 PCRelRodata4(8)
return
}