Record information about sections of emitted code+data.
The result of the emitter is a vector of bytes holding machine code, jump tables, and (in the future) other read-only data. Some clients, notably Firefox's Wasm compiler, needs to separate the machine code from the data in order to insert more code directly after the code generated by Cranelift. To make such separation possible, we record more information about the emitted bytes: the sizes of each of the sections of code, jump tables, and read-only data, as well as the locations within the code that reference (PC-relatively) the jump tables and read-only data.
This commit is contained in:
committed by
Lars T Hansen
parent
70f79d23bf
commit
420850adf0
@@ -1424,8 +1424,8 @@ function %I64_JT(i64 [%rdi]) {
|
||||
ebb0(v0: i64 [%rdi]):
|
||||
; Note: The next two lines will need to change whenever instructions are
|
||||
; added or removed from this test.
|
||||
[-, %rax] v1 = jump_table_base.i64 jt0 ; bin: 48 8d 05 00000039
|
||||
[-, %r10] v2 = jump_table_base.i64 jt0 ; bin: 4c 8d 15 00000032
|
||||
[-, %rax] v1 = jump_table_base.i64 jt0 ; bin: 48 8d 05 00000039 PCRelRodata4(jt0)
|
||||
[-, %r10] v2 = jump_table_base.i64 jt0 ; bin: 4c 8d 15 00000032 PCRelRodata4(jt0)
|
||||
|
||||
[-, %rbx] v10 = iconst.i64 1
|
||||
[-, %r13] v11 = iconst.i64 2
|
||||
|
||||
Reference in New Issue
Block a user