x64: use constant pool for u64 constants rather than movabs. (#4088)
* Allow emitting u64 constants into constant pool. * Use constant pool for constants on x64 that do not fit in a simm32 and are needed as a RegMem or RegMemImm. * Fix rip-relative addressing bug in pinsrd emission.
This commit is contained in:
@@ -442,6 +442,16 @@
|
||||
(decl emit (MInst) Unit)
|
||||
(extern constructor emit emit)
|
||||
|
||||
;; Constant pool emission.
|
||||
|
||||
(type VCodeConstant (primitive VCodeConstant))
|
||||
|
||||
;; Add a u64 little-endian constant to the in-memory constant pool and
|
||||
;; return a VCodeConstant index that refers to it. This is
|
||||
;; side-effecting but idempotent (constants are deduplicated).
|
||||
(decl emit_u64_le_const (u64) VCodeConstant)
|
||||
(extern constructor emit_u64_le_const emit_u64_le_const)
|
||||
|
||||
;;;; Helpers for Side-Effectful Instructions Without Results ;;;;;;;;;;;;;;;;;;;
|
||||
|
||||
(type SideEffectNoResult (enum
|
||||
|
||||
Reference in New Issue
Block a user