Modify return pseudo-instructions to have pairs of registers: virtual and real. This allows us to constrain the virtual registers to the real ones specified by the abi, instead of directly emitting moves to those real registers.
34 lines
523 B
Plaintext
34 lines
523 B
Plaintext
test compile precise-output
|
|
target x86_64 has_sse41=false
|
|
|
|
function %f1(f32) -> f32 {
|
|
block0(v0: f32):
|
|
v1 = nearest v0
|
|
return v1
|
|
}
|
|
|
|
; pushq %rbp
|
|
; movq %rsp, %rbp
|
|
; block0:
|
|
; load_ext_name %NearestF32+0, %rcx
|
|
; call *%rcx
|
|
; movq %rbp, %rsp
|
|
; popq %rbp
|
|
; ret
|
|
|
|
function %f2(f64) -> f64 {
|
|
block0(v0: f64):
|
|
v1 = nearest v0
|
|
return v1
|
|
}
|
|
|
|
; pushq %rbp
|
|
; movq %rsp, %rbp
|
|
; block0:
|
|
; load_ext_name %NearestF64+0, %rcx
|
|
; call *%rcx
|
|
; movq %rbp, %rsp
|
|
; popq %rbp
|
|
; ret
|
|
|