This makes it easier to debug testcases: - the entity numbers in a .cton file match the entity numbers used within Cretonne. - serializing and deserializing doesn't cause indices to change. One disadvantage is that if a .cton file uses sparse entity numbers, deserializing to the in-memory form doesn't compact it. However, the text format is not intended to be performance-critical, so this isn't expected to be a big burden.
29 lines
868 B
Plaintext
29 lines
868 B
Plaintext
; binary emission of 64-bit code.
|
|
test binemit
|
|
set is_64bit
|
|
set is_compressed
|
|
set allones_funcaddrs
|
|
isa intel haswell
|
|
|
|
; The binary encodings can be verified with the command:
|
|
;
|
|
; sed -ne 's/^ *; asm: *//p' filetests/isa/intel/allones_funcaddrs64.cton | llvm-mc -show-encoding -triple=x86_64
|
|
;
|
|
|
|
; Tests from binary64.cton affected by allones_funcaddrs.
|
|
function %I64() {
|
|
sig0 = ()
|
|
fn0 = function %foo()
|
|
|
|
ebb0:
|
|
|
|
; asm: movabsq $-1, %rcx
|
|
[-,%rcx] v400 = func_addr.i64 fn0 ; bin: 48 b9 Abs8(%foo) ffffffffffffffff
|
|
; asm: movabsq $-1, %rsi
|
|
[-,%rsi] v401 = func_addr.i64 fn0 ; bin: 48 be Abs8(%foo) ffffffffffffffff
|
|
; asm: movabsq $-1, %r10
|
|
[-,%r10] v402 = func_addr.i64 fn0 ; bin: 49 ba Abs8(%foo) ffffffffffffffff
|
|
|
|
return ; bin: c3
|
|
}
|