x64: Ensure that constants are always 16 bytes for XmmMem (#4790)

Ensure that constants generated for the memory case of XmmMem values are always 16 bytes, ensuring that we don't accidantally perform an unaligned load.

Fixes #4761
This commit is contained in:
Trevor Elliott
2022-08-26 13:04:38 -07:00
committed by GitHub
parent 7a9078d9cc
commit ca6d648e37
5 changed files with 73 additions and 4 deletions

View File

@@ -1309,15 +1309,13 @@
;;
;; Asserts that the value goes into a XMM.
(decl put_in_xmm_mem (Value) XmmMem)
(rule (put_in_xmm_mem val)
(reg_mem_to_xmm_mem (put_in_reg_mem val)))
(extern constructor put_in_xmm_mem put_in_xmm_mem)
;; Put a value into a `XmmMemImm`.
;;
;; Asserts that the value goes into a XMM.
(decl put_in_xmm_mem_imm (Value) XmmMemImm)
(rule (put_in_xmm_mem_imm val)
(xmm_mem_imm_new (put_in_reg_mem_imm val)))
(extern constructor put_in_xmm_mem_imm put_in_xmm_mem_imm)
;; Construct an `InstOutput` out of a single GPR register.
(decl output_gpr (Gpr) InstOutput)