Mass rename Ebb and relatives to Block (#1365)
* Manually rename BasicBlock to BlockPredecessor BasicBlock is a pair of (Ebb, Inst) that is used to represent the basic block subcomponent of an Ebb that is a predecessor to an Ebb. Eventually we will be able to remove this struct, but for now it makes sense to give it a non-conflicting name so that we can start to transition Ebb to represent a basic block. I have not updated any comments that refer to BasicBlock, as eventually we will remove BlockPredecessor and replace with Block, which is a basic block, so the comments will become correct. * Manually rename SSABuilder block types to avoid conflict SSABuilder has its own Block and BlockData types. These along with associated identifier will cause conflicts in a later commit, so they are renamed to be more verbose here. * Automatically rename 'Ebb' to 'Block' in *.rs * Automatically rename 'EBB' to 'block' in *.rs * Automatically rename 'ebb' to 'block' in *.rs * Automatically rename 'extended basic block' to 'basic block' in *.rs * Automatically rename 'an basic block' to 'a basic block' in *.rs * Manually update comment for `Block` `Block`'s wikipedia article required an update. * Automatically rename 'an `Block`' to 'a `Block`' in *.rs * Automatically rename 'extended_basic_block' to 'basic_block' in *.rs * Automatically rename 'ebb' to 'block' in *.clif * Manually rename clif constant that contains 'ebb' as substring to avoid conflict * Automatically rename filecheck uses of 'EBB' to 'BB' 'regex: EBB' -> 'regex: BB' '$EBB' -> '$BB' * Automatically rename 'EBB' 'Ebb' to 'block' in *.clif * Automatically rename 'an block' to 'a block' in *.clif * Fix broken testcase when function name length increases Test function names are limited to 16 characters. This causes the new longer name to be truncated and fail a filecheck test. An outdated comment was also fixed.
This commit is contained in:
@@ -6,60 +6,60 @@ target i686 haswell
|
||||
target x86_64 haswell
|
||||
|
||||
function %br_if(i32) -> i32 {
|
||||
ebb0(v0: i32):
|
||||
block0(v0: i32):
|
||||
v1 = iconst.i32 1
|
||||
brz v0, ebb1(v1)
|
||||
jump ebb2
|
||||
brz v0, block1(v1)
|
||||
jump block2
|
||||
|
||||
ebb1(v2: i32):
|
||||
block1(v2: i32):
|
||||
return v2
|
||||
|
||||
ebb2:
|
||||
jump ebb1(v0)
|
||||
block2:
|
||||
jump block1(v0)
|
||||
}
|
||||
|
||||
function %br_if_not(i32) -> i32 {
|
||||
ebb0(v0: i32):
|
||||
block0(v0: i32):
|
||||
v1 = iconst.i32 1
|
||||
brnz v0, ebb1(v0)
|
||||
jump ebb2
|
||||
brnz v0, block1(v0)
|
||||
jump block2
|
||||
|
||||
ebb1(v2: i32):
|
||||
block1(v2: i32):
|
||||
return v2
|
||||
|
||||
ebb2:
|
||||
jump ebb1(v0)
|
||||
block2:
|
||||
jump block1(v0)
|
||||
}
|
||||
|
||||
function %br_if_fallthrough(i32) -> i32 {
|
||||
ebb0(v0: i32):
|
||||
block0(v0: i32):
|
||||
v1 = iconst.i32 1
|
||||
brz v0, ebb1(v1)
|
||||
brz v0, block1(v1)
|
||||
; This jump gets converted to a fallthrough.
|
||||
jump ebb1(v0)
|
||||
jump block1(v0)
|
||||
|
||||
ebb1(v2: i32):
|
||||
block1(v2: i32):
|
||||
return v2
|
||||
}
|
||||
|
||||
function %undefined() {
|
||||
ebb0:
|
||||
block0:
|
||||
trap user0
|
||||
}
|
||||
|
||||
function %br_table(i32) {
|
||||
jt0 = jump_table [ebb3, ebb1, ebb2]
|
||||
jt0 = jump_table [block3, block1, block2]
|
||||
|
||||
ebb0(v0: i32):
|
||||
br_table v0, ebb4, jt0
|
||||
block0(v0: i32):
|
||||
br_table v0, block4, jt0
|
||||
|
||||
ebb4:
|
||||
block4:
|
||||
trap oob
|
||||
|
||||
ebb1:
|
||||
block1:
|
||||
return
|
||||
ebb2:
|
||||
block2:
|
||||
return
|
||||
ebb3:
|
||||
block3:
|
||||
return
|
||||
}
|
||||
|
||||
@@ -4,199 +4,199 @@ test compile
|
||||
target x86_64 haswell
|
||||
|
||||
function %i32_wrap_i64(i64) -> i32 {
|
||||
ebb0(v0: i64):
|
||||
block0(v0: i64):
|
||||
v1 = ireduce.i32 v0
|
||||
return v1
|
||||
}
|
||||
|
||||
function %i64_extend_s_i32(i32) -> i64 {
|
||||
ebb0(v0: i32):
|
||||
block0(v0: i32):
|
||||
v1 = sextend.i64 v0
|
||||
return v1
|
||||
}
|
||||
|
||||
function %i64_extend_u_i32(i32) -> i64 {
|
||||
ebb0(v0: i32):
|
||||
block0(v0: i32):
|
||||
v1 = uextend.i64 v0
|
||||
return v1
|
||||
}
|
||||
|
||||
function %i32_trunc_s_f32(f32) -> i32 {
|
||||
ebb0(v0: f32):
|
||||
block0(v0: f32):
|
||||
v1 = fcvt_to_sint.i32 v0
|
||||
return v1
|
||||
}
|
||||
|
||||
function %i32_trunc_u_f32(f32) -> i32 {
|
||||
ebb0(v0: f32):
|
||||
block0(v0: f32):
|
||||
v1 = fcvt_to_uint.i32 v0
|
||||
return v1
|
||||
}
|
||||
|
||||
function %i32_trunc_s_f64(f64) -> i32 {
|
||||
ebb0(v0: f64):
|
||||
block0(v0: f64):
|
||||
v1 = fcvt_to_sint.i32 v0
|
||||
return v1
|
||||
}
|
||||
|
||||
function %i32_trunc_u_f64(f64) -> i32 {
|
||||
ebb0(v0: f64):
|
||||
block0(v0: f64):
|
||||
v1 = fcvt_to_uint.i32 v0
|
||||
return v1
|
||||
}
|
||||
|
||||
function %i64_trunc_s_f32(f32) -> i64 {
|
||||
ebb0(v0: f32):
|
||||
block0(v0: f32):
|
||||
v1 = fcvt_to_sint.i64 v0
|
||||
return v1
|
||||
}
|
||||
|
||||
function %i64_trunc_u_f32(f32) -> i64 {
|
||||
ebb0(v0: f32):
|
||||
block0(v0: f32):
|
||||
v1 = fcvt_to_uint.i64 v0
|
||||
return v1
|
||||
}
|
||||
|
||||
function %i64_trunc_s_f64(f64) -> i64 {
|
||||
ebb0(v0: f64):
|
||||
block0(v0: f64):
|
||||
v1 = fcvt_to_sint.i64 v0
|
||||
return v1
|
||||
}
|
||||
|
||||
function %i64_trunc_u_f64(f64) -> i64 {
|
||||
ebb0(v0: f64):
|
||||
block0(v0: f64):
|
||||
v1 = fcvt_to_uint.i64 v0
|
||||
return v1
|
||||
}
|
||||
|
||||
function %i32_trunc_s_sat_f32(f32) -> i32 {
|
||||
ebb0(v0: f32):
|
||||
block0(v0: f32):
|
||||
v1 = fcvt_to_sint_sat.i32 v0
|
||||
return v1
|
||||
}
|
||||
|
||||
function %i32_trunc_u_sat_f32(f32) -> i32 {
|
||||
ebb0(v0: f32):
|
||||
block0(v0: f32):
|
||||
v1 = fcvt_to_uint_sat.i32 v0
|
||||
return v1
|
||||
}
|
||||
|
||||
function %i32_trunc_s_sat_f64(f64) -> i32 {
|
||||
ebb0(v0: f64):
|
||||
block0(v0: f64):
|
||||
v1 = fcvt_to_sint_sat.i32 v0
|
||||
return v1
|
||||
}
|
||||
|
||||
function %i32_trunc_u_sat_f64(f64) -> i32 {
|
||||
ebb0(v0: f64):
|
||||
block0(v0: f64):
|
||||
v1 = fcvt_to_uint_sat.i32 v0
|
||||
return v1
|
||||
}
|
||||
|
||||
function %i64_trunc_s_sat_f32(f32) -> i64 {
|
||||
ebb0(v0: f32):
|
||||
block0(v0: f32):
|
||||
v1 = fcvt_to_sint_sat.i64 v0
|
||||
return v1
|
||||
}
|
||||
|
||||
function %i64_trunc_u_sat_f32(f32) -> i64 {
|
||||
ebb0(v0: f32):
|
||||
block0(v0: f32):
|
||||
v1 = fcvt_to_uint_sat.i64 v0
|
||||
return v1
|
||||
}
|
||||
|
||||
function %i64_trunc_s_sat_f64(f64) -> i64 {
|
||||
ebb0(v0: f64):
|
||||
block0(v0: f64):
|
||||
v1 = fcvt_to_sint_sat.i64 v0
|
||||
return v1
|
||||
}
|
||||
|
||||
function %i64_trunc_u_sat_f64(f64) -> i64 {
|
||||
ebb0(v0: f64):
|
||||
block0(v0: f64):
|
||||
v1 = fcvt_to_uint_sat.i64 v0
|
||||
return v1
|
||||
}
|
||||
|
||||
function %f32_trunc_f64(f64) -> f32 {
|
||||
ebb0(v0: f64):
|
||||
block0(v0: f64):
|
||||
v1 = fdemote.f32 v0
|
||||
return v1
|
||||
}
|
||||
|
||||
function %f64_promote_f32(f32) -> f64 {
|
||||
ebb0(v0: f32):
|
||||
block0(v0: f32):
|
||||
v1 = fpromote.f64 v0
|
||||
return v1
|
||||
}
|
||||
|
||||
function %f32_convert_s_i32(i32) -> f32 {
|
||||
ebb0(v0: i32):
|
||||
block0(v0: i32):
|
||||
v1 = fcvt_from_sint.f32 v0
|
||||
return v1
|
||||
}
|
||||
|
||||
function %f32_convert_u_i32(i32) -> f32 {
|
||||
ebb0(v0: i32):
|
||||
block0(v0: i32):
|
||||
v1 = fcvt_from_uint.f32 v0
|
||||
return v1
|
||||
}
|
||||
|
||||
function %f64_convert_s_i32(i32) -> f64 {
|
||||
ebb0(v0: i32):
|
||||
block0(v0: i32):
|
||||
v1 = fcvt_from_sint.f64 v0
|
||||
return v1
|
||||
}
|
||||
|
||||
function %f64_convert_u_i32(i32) -> f64 {
|
||||
ebb0(v0: i32):
|
||||
block0(v0: i32):
|
||||
v1 = fcvt_from_uint.f64 v0
|
||||
return v1
|
||||
}
|
||||
|
||||
function %f32_convert_s_i64(i64) -> f32 {
|
||||
ebb0(v0: i64):
|
||||
block0(v0: i64):
|
||||
v1 = fcvt_from_sint.f32 v0
|
||||
return v1
|
||||
}
|
||||
|
||||
function %f32_convert_u_i64(i64) -> f32 {
|
||||
ebb0(v0: i64):
|
||||
block0(v0: i64):
|
||||
v1 = fcvt_from_uint.f32 v0
|
||||
return v1
|
||||
}
|
||||
|
||||
function %f64_convert_s_i64(i64) -> f64 {
|
||||
ebb0(v0: i64):
|
||||
block0(v0: i64):
|
||||
v1 = fcvt_from_sint.f64 v0
|
||||
return v1
|
||||
}
|
||||
|
||||
function %f64_convert_u_i64(i64) -> f64 {
|
||||
ebb0(v0: i64):
|
||||
block0(v0: i64):
|
||||
v1 = fcvt_from_uint.f64 v0
|
||||
return v1
|
||||
}
|
||||
|
||||
function %i32_reinterpret_f32(f32) -> i32 {
|
||||
ebb0(v0: f32):
|
||||
block0(v0: f32):
|
||||
v1 = bitcast.i32 v0
|
||||
return v1
|
||||
}
|
||||
|
||||
function %f32_reinterpret_i32(i32) -> f32 {
|
||||
ebb0(v0: i32):
|
||||
block0(v0: i32):
|
||||
v1 = bitcast.f32 v0
|
||||
return v1
|
||||
}
|
||||
|
||||
function %i64_reinterpret_f64(f64) -> i64 {
|
||||
ebb0(v0: f64):
|
||||
block0(v0: f64):
|
||||
v1 = bitcast.i64 v0
|
||||
return v1
|
||||
}
|
||||
|
||||
function %f64_reinterpret_i64(i64) -> f64 {
|
||||
ebb0(v0: i64):
|
||||
block0(v0: i64):
|
||||
v1 = bitcast.f64 v0
|
||||
return v1
|
||||
}
|
||||
|
||||
@@ -9,7 +9,7 @@ target x86_64 baseline
|
||||
; Constants.
|
||||
|
||||
function %f32_const() -> f32 {
|
||||
ebb0:
|
||||
block0:
|
||||
v1 = f32const 0x3.0
|
||||
return v1
|
||||
}
|
||||
@@ -17,43 +17,43 @@ ebb0:
|
||||
; Unary operations
|
||||
|
||||
function %f32_abs(f32) -> f32 {
|
||||
ebb0(v0: f32):
|
||||
block0(v0: f32):
|
||||
v1 = fabs v0
|
||||
return v1
|
||||
}
|
||||
|
||||
function %f32_neg(f32) -> f32 {
|
||||
ebb0(v0: f32):
|
||||
block0(v0: f32):
|
||||
v1 = fneg v0
|
||||
return v1
|
||||
}
|
||||
|
||||
function %f32_sqrt(f32) -> f32 {
|
||||
ebb0(v0: f32):
|
||||
block0(v0: f32):
|
||||
v1 = sqrt v0
|
||||
return v1
|
||||
}
|
||||
|
||||
function %f32_ceil(f32) -> f32 {
|
||||
ebb0(v0: f32):
|
||||
block0(v0: f32):
|
||||
v1 = ceil v0
|
||||
return v1
|
||||
}
|
||||
|
||||
function %f32_floor(f32) -> f32 {
|
||||
ebb0(v0: f32):
|
||||
block0(v0: f32):
|
||||
v1 = floor v0
|
||||
return v1
|
||||
}
|
||||
|
||||
function %f32_trunc(f32) -> f32 {
|
||||
ebb0(v0: f32):
|
||||
block0(v0: f32):
|
||||
v1 = trunc v0
|
||||
return v1
|
||||
}
|
||||
|
||||
function %f32_nearest (f32) -> f32 {
|
||||
ebb0(v0: f32):
|
||||
block0(v0: f32):
|
||||
v1 = nearest v0
|
||||
return v1
|
||||
}
|
||||
@@ -61,43 +61,43 @@ ebb0(v0: f32):
|
||||
; Binary Operations
|
||||
|
||||
function %f32_add(f32, f32) -> f32 {
|
||||
ebb0(v0: f32, v1: f32):
|
||||
block0(v0: f32, v1: f32):
|
||||
v2 = fadd v0, v1
|
||||
return v2
|
||||
}
|
||||
|
||||
function %f32_sub(f32, f32) -> f32 {
|
||||
ebb0(v0: f32, v1: f32):
|
||||
block0(v0: f32, v1: f32):
|
||||
v2 = fsub v0, v1
|
||||
return v2
|
||||
}
|
||||
|
||||
function %f32_mul(f32, f32) -> f32 {
|
||||
ebb0(v0: f32, v1: f32):
|
||||
block0(v0: f32, v1: f32):
|
||||
v2 = fmul v0, v1
|
||||
return v2
|
||||
}
|
||||
|
||||
function %f32_div(f32, f32) -> f32 {
|
||||
ebb0(v0: f32, v1: f32):
|
||||
block0(v0: f32, v1: f32):
|
||||
v2 = fdiv v0, v1
|
||||
return v2
|
||||
}
|
||||
|
||||
function %f32_min(f32, f32) -> f32 {
|
||||
ebb0(v0: f32, v1: f32):
|
||||
block0(v0: f32, v1: f32):
|
||||
v2 = fmin v0, v1
|
||||
return v2
|
||||
}
|
||||
|
||||
function %f32_max(f32, f32) -> f32 {
|
||||
ebb0(v0: f32, v1: f32):
|
||||
block0(v0: f32, v1: f32):
|
||||
v2 = fmax v0, v1
|
||||
return v2
|
||||
}
|
||||
|
||||
function %f32_copysign(f32, f32) -> f32 {
|
||||
ebb0(v0: f32, v1: f32):
|
||||
block0(v0: f32, v1: f32):
|
||||
v2 = fcopysign v0, v1
|
||||
return v2
|
||||
}
|
||||
|
||||
@@ -6,42 +6,42 @@ target i686 haswell
|
||||
target x86_64 haswell
|
||||
|
||||
function %f32_eq(f32, f32) -> i32 {
|
||||
ebb0(v0: f32, v1: f32):
|
||||
block0(v0: f32, v1: f32):
|
||||
v2 = fcmp eq v0, v1
|
||||
v3 = bint.i32 v2
|
||||
return v3
|
||||
}
|
||||
|
||||
function %f32_ne(f32, f32) -> i32 {
|
||||
ebb0(v0: f32, v1: f32):
|
||||
block0(v0: f32, v1: f32):
|
||||
v2 = fcmp ne v0, v1
|
||||
v3 = bint.i32 v2
|
||||
return v3
|
||||
}
|
||||
|
||||
function %f32_lt(f32, f32) -> i32 {
|
||||
ebb0(v0: f32, v1: f32):
|
||||
block0(v0: f32, v1: f32):
|
||||
v2 = fcmp lt v0, v1
|
||||
v3 = bint.i32 v2
|
||||
return v3
|
||||
}
|
||||
|
||||
function %f32_gt(f32, f32) -> i32 {
|
||||
ebb0(v0: f32, v1: f32):
|
||||
block0(v0: f32, v1: f32):
|
||||
v2 = fcmp gt v0, v1
|
||||
v3 = bint.i32 v2
|
||||
return v3
|
||||
}
|
||||
|
||||
function %f32_le(f32, f32) -> i32 {
|
||||
ebb0(v0: f32, v1: f32):
|
||||
block0(v0: f32, v1: f32):
|
||||
v2 = fcmp le v0, v1
|
||||
v3 = bint.i32 v2
|
||||
return v3
|
||||
}
|
||||
|
||||
function %f32_ge(f32, f32) -> i32 {
|
||||
ebb0(v0: f32, v1: f32):
|
||||
block0(v0: f32, v1: f32):
|
||||
v2 = fcmp ge v0, v1
|
||||
v3 = bint.i32 v2
|
||||
return v3
|
||||
|
||||
@@ -9,7 +9,7 @@ function %f32_load(i32, i64 vmctx) -> f32 {
|
||||
gv0 = vmctx
|
||||
heap0 = static gv0, min 0x0001_0000, bound 0x0001_0000_0000, offset_guard 0x8000_0000
|
||||
|
||||
ebb0(v0: i32, v1: i64):
|
||||
block0(v0: i32, v1: i64):
|
||||
v2 = heap_addr.i64 heap0, v0, 1
|
||||
v3 = load.f32 v2
|
||||
return v3
|
||||
@@ -19,7 +19,7 @@ function %f32_store(f32, i32, i64 vmctx) {
|
||||
gv0 = vmctx
|
||||
heap0 = static gv0, min 0x0001_0000, bound 0x0001_0000_0000, offset_guard 0x8000_0000
|
||||
|
||||
ebb0(v0: f32, v1: i32, v2: i64):
|
||||
block0(v0: f32, v1: i32, v2: i64):
|
||||
v3 = heap_addr.i64 heap0, v1, 1
|
||||
store v0, v3
|
||||
return
|
||||
|
||||
@@ -7,7 +7,7 @@ target x86_64 baseline
|
||||
; Constants.
|
||||
|
||||
function %f64_const() -> f64 {
|
||||
ebb0:
|
||||
block0:
|
||||
v1 = f64const 0x3.0
|
||||
return v1
|
||||
}
|
||||
@@ -15,43 +15,43 @@ ebb0:
|
||||
; Unary operations
|
||||
|
||||
function %f64_abs(f64) -> f64 {
|
||||
ebb0(v0: f64):
|
||||
block0(v0: f64):
|
||||
v1 = fabs v0
|
||||
return v1
|
||||
}
|
||||
|
||||
function %f64_neg(f64) -> f64 {
|
||||
ebb0(v0: f64):
|
||||
block0(v0: f64):
|
||||
v1 = fneg v0
|
||||
return v1
|
||||
}
|
||||
|
||||
function %f64_sqrt(f64) -> f64 {
|
||||
ebb0(v0: f64):
|
||||
block0(v0: f64):
|
||||
v1 = sqrt v0
|
||||
return v1
|
||||
}
|
||||
|
||||
function %f64_ceil(f64) -> f64 {
|
||||
ebb0(v0: f64):
|
||||
block0(v0: f64):
|
||||
v1 = ceil v0
|
||||
return v1
|
||||
}
|
||||
|
||||
function %f64_floor(f64) -> f64 {
|
||||
ebb0(v0: f64):
|
||||
block0(v0: f64):
|
||||
v1 = floor v0
|
||||
return v1
|
||||
}
|
||||
|
||||
function %f64_trunc(f64) -> f64 {
|
||||
ebb0(v0: f64):
|
||||
block0(v0: f64):
|
||||
v1 = trunc v0
|
||||
return v1
|
||||
}
|
||||
|
||||
function %f64_nearest (f64) -> f64 {
|
||||
ebb0(v0: f64):
|
||||
block0(v0: f64):
|
||||
v1 = nearest v0
|
||||
return v1
|
||||
}
|
||||
@@ -59,43 +59,43 @@ ebb0(v0: f64):
|
||||
; Binary Operations
|
||||
|
||||
function %f64_add(f64, f64) -> f64 {
|
||||
ebb0(v0: f64, v1: f64):
|
||||
block0(v0: f64, v1: f64):
|
||||
v2 = fadd v0, v1
|
||||
return v2
|
||||
}
|
||||
|
||||
function %f64_sub(f64, f64) -> f64 {
|
||||
ebb0(v0: f64, v1: f64):
|
||||
block0(v0: f64, v1: f64):
|
||||
v2 = fsub v0, v1
|
||||
return v2
|
||||
}
|
||||
|
||||
function %f64_mul(f64, f64) -> f64 {
|
||||
ebb0(v0: f64, v1: f64):
|
||||
block0(v0: f64, v1: f64):
|
||||
v2 = fmul v0, v1
|
||||
return v2
|
||||
}
|
||||
|
||||
function %f64_div(f64, f64) -> f64 {
|
||||
ebb0(v0: f64, v1: f64):
|
||||
block0(v0: f64, v1: f64):
|
||||
v2 = fdiv v0, v1
|
||||
return v2
|
||||
}
|
||||
|
||||
function %f64_min(f64, f64) -> f64 {
|
||||
ebb0(v0: f64, v1: f64):
|
||||
block0(v0: f64, v1: f64):
|
||||
v2 = fmin v0, v1
|
||||
return v2
|
||||
}
|
||||
|
||||
function %f64_max(f64, f64) -> f64 {
|
||||
ebb0(v0: f64, v1: f64):
|
||||
block0(v0: f64, v1: f64):
|
||||
v2 = fmax v0, v1
|
||||
return v2
|
||||
}
|
||||
|
||||
function %f64_copysign(f64, f64) -> f64 {
|
||||
ebb0(v0: f64, v1: f64):
|
||||
block0(v0: f64, v1: f64):
|
||||
v2 = fcopysign v0, v1
|
||||
return v2
|
||||
}
|
||||
|
||||
@@ -6,42 +6,42 @@ target i686 haswell
|
||||
target x86_64 haswell
|
||||
|
||||
function %f64_eq(f64, f64) -> i32 {
|
||||
ebb0(v0: f64, v1: f64):
|
||||
block0(v0: f64, v1: f64):
|
||||
v2 = fcmp eq v0, v1
|
||||
v3 = bint.i32 v2
|
||||
return v3
|
||||
}
|
||||
|
||||
function %f64_ne(f64, f64) -> i32 {
|
||||
ebb0(v0: f64, v1: f64):
|
||||
block0(v0: f64, v1: f64):
|
||||
v2 = fcmp ne v0, v1
|
||||
v3 = bint.i32 v2
|
||||
return v3
|
||||
}
|
||||
|
||||
function %f64_lt(f64, f64) -> i32 {
|
||||
ebb0(v0: f64, v1: f64):
|
||||
block0(v0: f64, v1: f64):
|
||||
v2 = fcmp lt v0, v1
|
||||
v3 = bint.i32 v2
|
||||
return v3
|
||||
}
|
||||
|
||||
function %f64_gt(f64, f64) -> i32 {
|
||||
ebb0(v0: f64, v1: f64):
|
||||
block0(v0: f64, v1: f64):
|
||||
v2 = fcmp gt v0, v1
|
||||
v3 = bint.i32 v2
|
||||
return v3
|
||||
}
|
||||
|
||||
function %f64_le(f64, f64) -> i32 {
|
||||
ebb0(v0: f64, v1: f64):
|
||||
block0(v0: f64, v1: f64):
|
||||
v2 = fcmp le v0, v1
|
||||
v3 = bint.i32 v2
|
||||
return v3
|
||||
}
|
||||
|
||||
function %f64_ge(f64, f64) -> i32 {
|
||||
ebb0(v0: f64, v1: f64):
|
||||
block0(v0: f64, v1: f64):
|
||||
v2 = fcmp ge v0, v1
|
||||
v3 = bint.i32 v2
|
||||
return v3
|
||||
|
||||
@@ -9,7 +9,7 @@ function %f64_load(i32, i64 vmctx) -> f64 {
|
||||
gv0 = vmctx
|
||||
heap0 = static gv0, min 0x0001_0000, bound 0x0001_0000_0000, offset_guard 0x8000_0000
|
||||
|
||||
ebb0(v0: i32, v1: i64):
|
||||
block0(v0: i32, v1: i64):
|
||||
v2 = heap_addr.i64 heap0, v0, 1
|
||||
v3 = load.f64 v2
|
||||
return v3
|
||||
@@ -19,7 +19,7 @@ function %f64_store(f64, i32, i64 vmctx) {
|
||||
gv0 = vmctx
|
||||
heap0 = static gv0, min 0x0001_0000, bound 0x0001_0000_0000, offset_guard 0x8000_0000
|
||||
|
||||
ebb0(v0: f64, v1: i32, v2: i64):
|
||||
block0(v0: f64, v1: i32, v2: i64):
|
||||
v3 = heap_addr.i64 heap0, v1, 1
|
||||
store v0, v3
|
||||
return
|
||||
|
||||
@@ -9,7 +9,7 @@ target x86_64 baseline
|
||||
; Constants.
|
||||
|
||||
function %i32_const() -> i32 {
|
||||
ebb0:
|
||||
block0:
|
||||
v0 = iconst.i32 0x8765_4321
|
||||
return v0
|
||||
}
|
||||
@@ -17,19 +17,19 @@ ebb0:
|
||||
; Unary operations.
|
||||
|
||||
function %i32_clz(i32) -> i32 {
|
||||
ebb0(v0: i32):
|
||||
block0(v0: i32):
|
||||
v1 = clz v0
|
||||
return v1
|
||||
}
|
||||
|
||||
function %i32_ctz(i32) -> i32 {
|
||||
ebb0(v0: i32):
|
||||
block0(v0: i32):
|
||||
v1 = ctz v0
|
||||
return v1
|
||||
}
|
||||
|
||||
function %i32_popcnt(i32) -> i32 {
|
||||
ebb0(v0: i32):
|
||||
block0(v0: i32):
|
||||
v1 = popcnt v0
|
||||
return v1
|
||||
}
|
||||
@@ -37,91 +37,91 @@ ebb0(v0: i32):
|
||||
; Binary operations.
|
||||
|
||||
function %i32_add(i32, i32) -> i32 {
|
||||
ebb0(v0: i32, v1: i32):
|
||||
block0(v0: i32, v1: i32):
|
||||
v2 = iadd v0, v1
|
||||
return v2
|
||||
}
|
||||
|
||||
function %i32_sub(i32, i32) -> i32 {
|
||||
ebb0(v0: i32, v1: i32):
|
||||
block0(v0: i32, v1: i32):
|
||||
v2 = isub v0, v1
|
||||
return v2
|
||||
}
|
||||
|
||||
function %i32_mul(i32, i32) -> i32 {
|
||||
ebb0(v0: i32, v1: i32):
|
||||
block0(v0: i32, v1: i32):
|
||||
v2 = imul v0, v1
|
||||
return v2
|
||||
}
|
||||
|
||||
function %i32_div_s(i32, i32) -> i32 {
|
||||
ebb0(v0: i32, v1: i32):
|
||||
block0(v0: i32, v1: i32):
|
||||
v2 = sdiv v0, v1
|
||||
return v2
|
||||
}
|
||||
|
||||
function %i32_div_u(i32, i32) -> i32 {
|
||||
ebb0(v0: i32, v1: i32):
|
||||
block0(v0: i32, v1: i32):
|
||||
v2 = udiv v0, v1
|
||||
return v2
|
||||
}
|
||||
|
||||
function %i32_rem_s(i32, i32) -> i32 {
|
||||
ebb0(v0: i32, v1: i32):
|
||||
block0(v0: i32, v1: i32):
|
||||
v2 = srem v0, v1
|
||||
return v2
|
||||
}
|
||||
|
||||
function %i32_rem_u(i32, i32) -> i32 {
|
||||
ebb0(v0: i32, v1: i32):
|
||||
block0(v0: i32, v1: i32):
|
||||
v2 = urem v0, v1
|
||||
return v2
|
||||
}
|
||||
|
||||
function %i32_and(i32, i32) -> i32 {
|
||||
ebb0(v0: i32, v1: i32):
|
||||
block0(v0: i32, v1: i32):
|
||||
v2 = band v0, v1
|
||||
return v2
|
||||
}
|
||||
|
||||
function %i32_or(i32, i32) -> i32 {
|
||||
ebb0(v0: i32, v1: i32):
|
||||
block0(v0: i32, v1: i32):
|
||||
v2 = bor v0, v1
|
||||
return v2
|
||||
}
|
||||
|
||||
function %i32_xor(i32, i32) -> i32 {
|
||||
ebb0(v0: i32, v1: i32):
|
||||
block0(v0: i32, v1: i32):
|
||||
v2 = bxor v0, v1
|
||||
return v2
|
||||
}
|
||||
|
||||
function %i32_shl(i32, i32) -> i32 {
|
||||
ebb0(v0: i32, v1: i32):
|
||||
block0(v0: i32, v1: i32):
|
||||
v2 = ishl v0, v1
|
||||
return v2
|
||||
}
|
||||
|
||||
function %i32_shr_s(i32, i32) -> i32 {
|
||||
ebb0(v0: i32, v1: i32):
|
||||
block0(v0: i32, v1: i32):
|
||||
v2 = sshr v0, v1
|
||||
return v2
|
||||
}
|
||||
|
||||
function %i32_shr_u(i32, i32) -> i32 {
|
||||
ebb0(v0: i32, v1: i32):
|
||||
block0(v0: i32, v1: i32):
|
||||
v2 = ushr v0, v1
|
||||
return v2
|
||||
}
|
||||
|
||||
function %i32_rotl(i32, i32) -> i32 {
|
||||
ebb0(v0: i32, v1: i32):
|
||||
block0(v0: i32, v1: i32):
|
||||
v2 = rotl v0, v1
|
||||
return v2
|
||||
}
|
||||
|
||||
function %i32_rotr(i32, i32) -> i32 {
|
||||
ebb0(v0: i32, v1: i32):
|
||||
block0(v0: i32, v1: i32):
|
||||
v2 = rotr v0, v1
|
||||
return v2
|
||||
}
|
||||
|
||||
@@ -6,77 +6,77 @@ target i686 haswell
|
||||
target x86_64 haswell
|
||||
|
||||
function %i32_eqz(i32) -> i32 {
|
||||
ebb0(v0: i32):
|
||||
block0(v0: i32):
|
||||
v1 = icmp_imm eq v0, 0
|
||||
v2 = bint.i32 v1
|
||||
return v2
|
||||
}
|
||||
|
||||
function %i32_eq(i32, i32) -> i32 {
|
||||
ebb0(v0: i32, v1: i32):
|
||||
block0(v0: i32, v1: i32):
|
||||
v2 = icmp eq v0, v1
|
||||
v3 = bint.i32 v2
|
||||
return v3
|
||||
}
|
||||
|
||||
function %i32_ne(i32, i32) -> i32 {
|
||||
ebb0(v0: i32, v1: i32):
|
||||
block0(v0: i32, v1: i32):
|
||||
v2 = icmp ne v0, v1
|
||||
v3 = bint.i32 v2
|
||||
return v3
|
||||
}
|
||||
|
||||
function %i32_lt_s(i32, i32) -> i32 {
|
||||
ebb0(v0: i32, v1: i32):
|
||||
block0(v0: i32, v1: i32):
|
||||
v2 = icmp slt v0, v1
|
||||
v3 = bint.i32 v2
|
||||
return v3
|
||||
}
|
||||
|
||||
function %i32_lt_u(i32, i32) -> i32 {
|
||||
ebb0(v0: i32, v1: i32):
|
||||
block0(v0: i32, v1: i32):
|
||||
v2 = icmp ult v0, v1
|
||||
v3 = bint.i32 v2
|
||||
return v3
|
||||
}
|
||||
|
||||
function %i32_gt_s(i32, i32) -> i32 {
|
||||
ebb0(v0: i32, v1: i32):
|
||||
block0(v0: i32, v1: i32):
|
||||
v2 = icmp sgt v0, v1
|
||||
v3 = bint.i32 v2
|
||||
return v3
|
||||
}
|
||||
|
||||
function %i32_gt_u(i32, i32) -> i32 {
|
||||
ebb0(v0: i32, v1: i32):
|
||||
block0(v0: i32, v1: i32):
|
||||
v2 = icmp ugt v0, v1
|
||||
v3 = bint.i32 v2
|
||||
return v3
|
||||
}
|
||||
|
||||
function %i32_le_s(i32, i32) -> i32 {
|
||||
ebb0(v0: i32, v1: i32):
|
||||
block0(v0: i32, v1: i32):
|
||||
v2 = icmp sle v0, v1
|
||||
v3 = bint.i32 v2
|
||||
return v3
|
||||
}
|
||||
|
||||
function %i32_le_u(i32, i32) -> i32 {
|
||||
ebb0(v0: i32, v1: i32):
|
||||
block0(v0: i32, v1: i32):
|
||||
v2 = icmp ule v0, v1
|
||||
v3 = bint.i32 v2
|
||||
return v3
|
||||
}
|
||||
|
||||
function %i32_ge_s(i32, i32) -> i32 {
|
||||
ebb0(v0: i32, v1: i32):
|
||||
block0(v0: i32, v1: i32):
|
||||
v2 = icmp sge v0, v1
|
||||
v3 = bint.i32 v2
|
||||
return v3
|
||||
}
|
||||
|
||||
function %i32_ge_u(i32, i32) -> i32 {
|
||||
ebb0(v0: i32, v1: i32):
|
||||
block0(v0: i32, v1: i32):
|
||||
v2 = icmp uge v0, v1
|
||||
v3 = bint.i32 v2
|
||||
return v3
|
||||
|
||||
@@ -9,7 +9,7 @@ function %i32_load(i32, i64 vmctx) -> i32 {
|
||||
gv0 = vmctx
|
||||
heap0 = static gv0, min 0x0001_0000, bound 0x0001_0000_0000, offset_guard 0x8000_0000
|
||||
|
||||
ebb0(v0: i32, v1: i64):
|
||||
block0(v0: i32, v1: i64):
|
||||
v2 = heap_addr.i64 heap0, v0, 1
|
||||
v3 = load.i32 v2
|
||||
return v3
|
||||
@@ -19,7 +19,7 @@ function %i32_store(i32, i32, i64 vmctx) {
|
||||
gv0 = vmctx
|
||||
heap0 = static gv0, min 0x0001_0000, bound 0x0001_0000_0000, offset_guard 0x8000_0000
|
||||
|
||||
ebb0(v0: i32, v1: i32, v2: i64):
|
||||
block0(v0: i32, v1: i32, v2: i64):
|
||||
v3 = heap_addr.i64 heap0, v1, 1
|
||||
store v0, v3
|
||||
return
|
||||
@@ -29,7 +29,7 @@ function %i32_load8_s(i32, i64 vmctx) -> i32 {
|
||||
gv0 = vmctx
|
||||
heap0 = static gv0, min 0x0001_0000, bound 0x0001_0000_0000, offset_guard 0x8000_0000
|
||||
|
||||
ebb0(v0: i32, v1: i64):
|
||||
block0(v0: i32, v1: i64):
|
||||
v2 = heap_addr.i64 heap0, v0, 1
|
||||
v3 = sload8.i32 v2
|
||||
return v3
|
||||
@@ -39,7 +39,7 @@ function %i32_load8_u(i32, i64 vmctx) -> i32 {
|
||||
gv0 = vmctx
|
||||
heap0 = static gv0, min 0x0001_0000, bound 0x0001_0000_0000, offset_guard 0x8000_0000
|
||||
|
||||
ebb0(v0: i32, v1: i64):
|
||||
block0(v0: i32, v1: i64):
|
||||
v2 = heap_addr.i64 heap0, v0, 1
|
||||
v3 = uload8.i32 v2
|
||||
return v3
|
||||
@@ -49,7 +49,7 @@ function %i32_store8(i32, i32, i64 vmctx) {
|
||||
gv0 = vmctx
|
||||
heap0 = static gv0, min 0x0001_0000, bound 0x0001_0000_0000, offset_guard 0x8000_0000
|
||||
|
||||
ebb0(v0: i32, v1: i32, v2: i64):
|
||||
block0(v0: i32, v1: i32, v2: i64):
|
||||
v3 = heap_addr.i64 heap0, v1, 1
|
||||
istore8 v0, v3
|
||||
return
|
||||
@@ -59,7 +59,7 @@ function %i32_load16_s(i32, i64 vmctx) -> i32 {
|
||||
gv0 = vmctx
|
||||
heap0 = static gv0, min 0x0001_0000, bound 0x0001_0000_0000, offset_guard 0x8000_0000
|
||||
|
||||
ebb0(v0: i32, v1: i64):
|
||||
block0(v0: i32, v1: i64):
|
||||
v2 = heap_addr.i64 heap0, v0, 1
|
||||
v3 = sload16.i32 v2
|
||||
return v3
|
||||
@@ -69,7 +69,7 @@ function %i32_load16_u(i32, i64 vmctx) -> i32 {
|
||||
gv0 = vmctx
|
||||
heap0 = static gv0, min 0x0001_0000, bound 0x0001_0000_0000, offset_guard 0x8000_0000
|
||||
|
||||
ebb0(v0: i32, v1: i64):
|
||||
block0(v0: i32, v1: i64):
|
||||
v2 = heap_addr.i64 heap0, v0, 1
|
||||
v3 = uload16.i32 v2
|
||||
return v3
|
||||
@@ -79,7 +79,7 @@ function %i32_store16(i32, i32, i64 vmctx) {
|
||||
gv0 = vmctx
|
||||
heap0 = static gv0, min 0x0001_0000, bound 0x0001_0000_0000, offset_guard 0x8000_0000
|
||||
|
||||
ebb0(v0: i32, v1: i32, v2: i64):
|
||||
block0(v0: i32, v1: i32, v2: i64):
|
||||
v3 = heap_addr.i64 heap0, v1, 1
|
||||
istore16 v0, v3
|
||||
return
|
||||
|
||||
@@ -7,7 +7,7 @@ target x86_64 baseline
|
||||
; Constants.
|
||||
|
||||
function %i64_const() -> i64 {
|
||||
ebb0:
|
||||
block0:
|
||||
v0 = iconst.i64 0x8765_4321
|
||||
return v0
|
||||
}
|
||||
@@ -15,19 +15,19 @@ ebb0:
|
||||
; Unary operations.
|
||||
|
||||
function %i64_clz(i64) -> i64 {
|
||||
ebb0(v0: i64):
|
||||
block0(v0: i64):
|
||||
v1 = clz v0
|
||||
return v1
|
||||
}
|
||||
|
||||
function %i64_ctz(i64) -> i64 {
|
||||
ebb0(v0: i64):
|
||||
block0(v0: i64):
|
||||
v1 = ctz v0
|
||||
return v1
|
||||
}
|
||||
|
||||
function %i64_popcnt(i64) -> i64 {
|
||||
ebb0(v0: i64):
|
||||
block0(v0: i64):
|
||||
v1 = popcnt v0
|
||||
return v1
|
||||
}
|
||||
@@ -35,91 +35,91 @@ ebb0(v0: i64):
|
||||
; Binary operations.
|
||||
|
||||
function %i64_add(i64, i64) -> i64 {
|
||||
ebb0(v0: i64, v1: i64):
|
||||
block0(v0: i64, v1: i64):
|
||||
v2 = iadd v0, v1
|
||||
return v2
|
||||
}
|
||||
|
||||
function %i64_sub(i64, i64) -> i64 {
|
||||
ebb0(v0: i64, v1: i64):
|
||||
block0(v0: i64, v1: i64):
|
||||
v2 = isub v0, v1
|
||||
return v2
|
||||
}
|
||||
|
||||
function %i64_mul(i64, i64) -> i64 {
|
||||
ebb0(v0: i64, v1: i64):
|
||||
block0(v0: i64, v1: i64):
|
||||
v2 = imul v0, v1
|
||||
return v2
|
||||
}
|
||||
|
||||
function %i32_div_s(i32, i32) -> i32 {
|
||||
ebb0(v0: i32, v1: i32):
|
||||
block0(v0: i32, v1: i32):
|
||||
v2 = sdiv v0, v1
|
||||
return v2
|
||||
}
|
||||
|
||||
function %i32_div_u(i32, i32) -> i32 {
|
||||
ebb0(v0: i32, v1: i32):
|
||||
block0(v0: i32, v1: i32):
|
||||
v2 = udiv v0, v1
|
||||
return v2
|
||||
}
|
||||
|
||||
function %i32_rem_s(i32, i32) -> i32 {
|
||||
ebb0(v0: i32, v1: i32):
|
||||
block0(v0: i32, v1: i32):
|
||||
v2 = srem v0, v1
|
||||
return v2
|
||||
}
|
||||
|
||||
function %i32_rem_u(i32, i32) -> i32 {
|
||||
ebb0(v0: i32, v1: i32):
|
||||
block0(v0: i32, v1: i32):
|
||||
v2 = urem v0, v1
|
||||
return v2
|
||||
}
|
||||
|
||||
function %i64_and(i64, i64) -> i64 {
|
||||
ebb0(v0: i64, v1: i64):
|
||||
block0(v0: i64, v1: i64):
|
||||
v2 = band v0, v1
|
||||
return v2
|
||||
}
|
||||
|
||||
function %i64_or(i64, i64) -> i64 {
|
||||
ebb0(v0: i64, v1: i64):
|
||||
block0(v0: i64, v1: i64):
|
||||
v2 = bor v0, v1
|
||||
return v2
|
||||
}
|
||||
|
||||
function %i64_xor(i64, i64) -> i64 {
|
||||
ebb0(v0: i64, v1: i64):
|
||||
block0(v0: i64, v1: i64):
|
||||
v2 = bxor v0, v1
|
||||
return v2
|
||||
}
|
||||
|
||||
function %i64_shl(i64, i64) -> i64 {
|
||||
ebb0(v0: i64, v1: i64):
|
||||
block0(v0: i64, v1: i64):
|
||||
v2 = ishl v0, v1
|
||||
return v2
|
||||
}
|
||||
|
||||
function %i64_shr_s(i64, i64) -> i64 {
|
||||
ebb0(v0: i64, v1: i64):
|
||||
block0(v0: i64, v1: i64):
|
||||
v2 = sshr v0, v1
|
||||
return v2
|
||||
}
|
||||
|
||||
function %i64_shr_u(i64, i64) -> i64 {
|
||||
ebb0(v0: i64, v1: i64):
|
||||
block0(v0: i64, v1: i64):
|
||||
v2 = ushr v0, v1
|
||||
return v2
|
||||
}
|
||||
|
||||
function %i64_rotl(i64, i64) -> i64 {
|
||||
ebb0(v0: i64, v1: i64):
|
||||
block0(v0: i64, v1: i64):
|
||||
v2 = rotl v0, v1
|
||||
return v2
|
||||
}
|
||||
|
||||
function %i64_rotr(i64, i64) -> i64 {
|
||||
ebb0(v0: i64, v1: i64):
|
||||
block0(v0: i64, v1: i64):
|
||||
v2 = rotr v0, v1
|
||||
return v2
|
||||
}
|
||||
|
||||
@@ -4,77 +4,77 @@ test compile
|
||||
target x86_64 haswell
|
||||
|
||||
function %i64_eqz(i64) -> i32 {
|
||||
ebb0(v0: i64):
|
||||
block0(v0: i64):
|
||||
v1 = icmp_imm eq v0, 0
|
||||
v2 = bint.i32 v1
|
||||
return v2
|
||||
}
|
||||
|
||||
function %i64_eq(i64, i64) -> i32 {
|
||||
ebb0(v0: i64, v1: i64):
|
||||
block0(v0: i64, v1: i64):
|
||||
v2 = icmp eq v0, v1
|
||||
v3 = bint.i32 v2
|
||||
return v3
|
||||
}
|
||||
|
||||
function %i64_ne(i64, i64) -> i32 {
|
||||
ebb0(v0: i64, v1: i64):
|
||||
block0(v0: i64, v1: i64):
|
||||
v2 = icmp ne v0, v1
|
||||
v3 = bint.i32 v2
|
||||
return v3
|
||||
}
|
||||
|
||||
function %i64_lt_s(i64, i64) -> i32 {
|
||||
ebb0(v0: i64, v1: i64):
|
||||
block0(v0: i64, v1: i64):
|
||||
v2 = icmp slt v0, v1
|
||||
v3 = bint.i32 v2
|
||||
return v3
|
||||
}
|
||||
|
||||
function %i64_lt_u(i64, i64) -> i32 {
|
||||
ebb0(v0: i64, v1: i64):
|
||||
block0(v0: i64, v1: i64):
|
||||
v2 = icmp ult v0, v1
|
||||
v3 = bint.i32 v2
|
||||
return v3
|
||||
}
|
||||
|
||||
function %i64_gt_s(i64, i64) -> i32 {
|
||||
ebb0(v0: i64, v1: i64):
|
||||
block0(v0: i64, v1: i64):
|
||||
v2 = icmp sgt v0, v1
|
||||
v3 = bint.i32 v2
|
||||
return v3
|
||||
}
|
||||
|
||||
function %i64_gt_u(i64, i64) -> i32 {
|
||||
ebb0(v0: i64, v1: i64):
|
||||
block0(v0: i64, v1: i64):
|
||||
v2 = icmp ugt v0, v1
|
||||
v3 = bint.i32 v2
|
||||
return v3
|
||||
}
|
||||
|
||||
function %i64_le_s(i64, i64) -> i32 {
|
||||
ebb0(v0: i64, v1: i64):
|
||||
block0(v0: i64, v1: i64):
|
||||
v2 = icmp sle v0, v1
|
||||
v3 = bint.i32 v2
|
||||
return v3
|
||||
}
|
||||
|
||||
function %i64_le_u(i64, i64) -> i32 {
|
||||
ebb0(v0: i64, v1: i64):
|
||||
block0(v0: i64, v1: i64):
|
||||
v2 = icmp ule v0, v1
|
||||
v3 = bint.i32 v2
|
||||
return v3
|
||||
}
|
||||
|
||||
function %i64_ge_s(i64, i64) -> i32 {
|
||||
ebb0(v0: i64, v1: i64):
|
||||
block0(v0: i64, v1: i64):
|
||||
v2 = icmp sge v0, v1
|
||||
v3 = bint.i32 v2
|
||||
return v3
|
||||
}
|
||||
|
||||
function %i64_ge_u(i64, i64) -> i32 {
|
||||
ebb0(v0: i64, v1: i64):
|
||||
block0(v0: i64, v1: i64):
|
||||
v2 = icmp uge v0, v1
|
||||
v3 = bint.i32 v2
|
||||
return v3
|
||||
|
||||
@@ -9,7 +9,7 @@ function %i64_load(i32, i64 vmctx) -> i64 {
|
||||
gv0 = vmctx
|
||||
heap0 = static gv0, min 0x0001_0000, bound 0x0001_0000_0000, offset_guard 0x8000_0000
|
||||
|
||||
ebb0(v0: i32, v1: i64):
|
||||
block0(v0: i32, v1: i64):
|
||||
v2 = heap_addr.i64 heap0, v0, 1
|
||||
v3 = load.i64 v2
|
||||
return v3
|
||||
@@ -19,7 +19,7 @@ function %i64_store(i64, i32, i64 vmctx) {
|
||||
gv0 = vmctx
|
||||
heap0 = static gv0, min 0x0001_0000, bound 0x0001_0000_0000, offset_guard 0x8000_0000
|
||||
|
||||
ebb0(v0: i64, v1: i32, v2: i64):
|
||||
block0(v0: i64, v1: i32, v2: i64):
|
||||
v3 = heap_addr.i64 heap0, v1, 1
|
||||
store v0, v3
|
||||
return
|
||||
@@ -29,7 +29,7 @@ function %i64_load8_s(i32, i64 vmctx) -> i64 {
|
||||
gv0 = vmctx
|
||||
heap0 = static gv0, min 0x0001_0000, bound 0x0001_0000_0000, offset_guard 0x8000_0000
|
||||
|
||||
ebb0(v0: i32, v1: i64):
|
||||
block0(v0: i32, v1: i64):
|
||||
v2 = heap_addr.i64 heap0, v0, 1
|
||||
v3 = sload8.i64 v2
|
||||
return v3
|
||||
@@ -39,7 +39,7 @@ function %i64_load8_u(i32, i64 vmctx) -> i64 {
|
||||
gv0 = vmctx
|
||||
heap0 = static gv0, min 0x0001_0000, bound 0x0001_0000_0000, offset_guard 0x8000_0000
|
||||
|
||||
ebb0(v0: i32, v1: i64):
|
||||
block0(v0: i32, v1: i64):
|
||||
v2 = heap_addr.i64 heap0, v0, 1
|
||||
v3 = uload8.i64 v2
|
||||
return v3
|
||||
@@ -49,7 +49,7 @@ function %i64_store8(i64, i32, i64 vmctx) {
|
||||
gv0 = vmctx
|
||||
heap0 = static gv0, min 0x0001_0000, bound 0x0001_0000_0000, offset_guard 0x8000_0000
|
||||
|
||||
ebb0(v0: i64, v1: i32, v2: i64):
|
||||
block0(v0: i64, v1: i32, v2: i64):
|
||||
v3 = heap_addr.i64 heap0, v1, 1
|
||||
istore8 v0, v3
|
||||
return
|
||||
@@ -59,7 +59,7 @@ function %i64_load16_s(i32, i64 vmctx) -> i64 {
|
||||
gv0 = vmctx
|
||||
heap0 = static gv0, min 0x0001_0000, bound 0x0001_0000_0000, offset_guard 0x8000_0000
|
||||
|
||||
ebb0(v0: i32, v1: i64):
|
||||
block0(v0: i32, v1: i64):
|
||||
v2 = heap_addr.i64 heap0, v0, 1
|
||||
v3 = sload16.i64 v2
|
||||
return v3
|
||||
@@ -69,7 +69,7 @@ function %i64_load16_u(i32, i64 vmctx) -> i64 {
|
||||
gv0 = vmctx
|
||||
heap0 = static gv0, min 0x0001_0000, bound 0x0001_0000_0000, offset_guard 0x8000_0000
|
||||
|
||||
ebb0(v0: i32, v1: i64):
|
||||
block0(v0: i32, v1: i64):
|
||||
v2 = heap_addr.i64 heap0, v0, 1
|
||||
v3 = uload16.i64 v2
|
||||
return v3
|
||||
@@ -79,7 +79,7 @@ function %i64_store16(i64, i32, i64 vmctx) {
|
||||
gv0 = vmctx
|
||||
heap0 = static gv0, min 0x0001_0000, bound 0x0001_0000_0000, offset_guard 0x8000_0000
|
||||
|
||||
ebb0(v0: i64, v1: i32, v2: i64):
|
||||
block0(v0: i64, v1: i32, v2: i64):
|
||||
v3 = heap_addr.i64 heap0, v1, 1
|
||||
istore16 v0, v3
|
||||
return
|
||||
@@ -89,7 +89,7 @@ function %i64_load32_s(i32, i64 vmctx) -> i64 {
|
||||
gv0 = vmctx
|
||||
heap0 = static gv0, min 0x0001_0000, bound 0x0001_0000_0000, offset_guard 0x8000_0000
|
||||
|
||||
ebb0(v0: i32, v1: i64):
|
||||
block0(v0: i32, v1: i64):
|
||||
v2 = heap_addr.i64 heap0, v0, 1
|
||||
v3 = sload32.i64 v2
|
||||
return v3
|
||||
@@ -99,7 +99,7 @@ function %i64_load32_u(i32, i64 vmctx) -> i64 {
|
||||
gv0 = vmctx
|
||||
heap0 = static gv0, min 0x0001_0000, bound 0x0001_0000_0000, offset_guard 0x8000_0000
|
||||
|
||||
ebb0(v0: i32, v1: i64):
|
||||
block0(v0: i32, v1: i64):
|
||||
v2 = heap_addr.i64 heap0, v0, 1
|
||||
v3 = uload32.i64 v2
|
||||
return v3
|
||||
@@ -109,7 +109,7 @@ function %i64_store32(i64, i32, i64 vmctx) {
|
||||
gv0 = vmctx
|
||||
heap0 = static gv0, min 0x0001_0000, bound 0x0001_0000_0000, offset_guard 0x8000_0000
|
||||
|
||||
ebb0(v0: i64, v1: i32, v2: i64):
|
||||
block0(v0: i64, v1: i32, v2: i64):
|
||||
v3 = heap_addr.i64 heap0, v1, 1
|
||||
istore32 v0, v3
|
||||
return
|
||||
|
||||
@@ -7,8 +7,8 @@ target x86_64 haswell
|
||||
function %return_4_b1s(b1, b1, b1, b1) -> b1, b1, b1, b1 {
|
||||
;; check: function %return_4_b1s(b1 [%rsi], b1 [%rdx], b1 [%rcx], b1 [%r8], i64 sret [%rdi], i64 fp [%rbp]) -> i64 sret [%rax], i64 fp [%rbp] fast {
|
||||
|
||||
ebb0(v0: b1, v1: b1, v2: b1, v3: b1):
|
||||
; check: ebb0(v0: b1 [%rsi], v1: b1 [%rdx], v2: b1 [%rcx], v3: b1 [%r8], v4: i64 [%rdi], v13: i64 [%rbp]):
|
||||
block0(v0: b1, v1: b1, v2: b1, v3: b1):
|
||||
; check: block0(v0: b1 [%rsi], v1: b1 [%rdx], v2: b1 [%rcx], v3: b1 [%r8], v4: i64 [%rdi], v13: i64 [%rbp]):
|
||||
|
||||
return v0, v1, v2, v3
|
||||
; check: v5 = bint.i8 v0
|
||||
@@ -32,8 +32,8 @@ function %call_4_b1s() {
|
||||
fn0 = colocated %return_4_b1s(b1, b1, b1, b1) -> b1, b1, b1, b1
|
||||
; check: sig0 = (b1 [%rsi], b1 [%rdx], b1 [%rcx], b1 [%r8], i64 sret [%rdi]) -> i64 sret [%rax] fast
|
||||
|
||||
ebb0:
|
||||
; check: ebb0(v26: i64 [%rbp], v27: i64 [%rbx]):
|
||||
block0:
|
||||
; check: block0(v26: i64 [%rbp], v27: i64 [%rbx]):
|
||||
|
||||
v0 = bconst.b1 true
|
||||
v1 = bconst.b1 false
|
||||
|
||||
@@ -9,7 +9,7 @@ function %call_indirect_many_rets(i64) {
|
||||
sig0 = () -> i64, i64, i64, i64
|
||||
; check: sig0 = (i64 sret [%rdi]) -> i64 sret [%rax] fast
|
||||
|
||||
ebb0(v0: i64):
|
||||
block0(v0: i64):
|
||||
v1, v2, v3, v4 = call_indirect sig0, v0()
|
||||
; check: v5 = stack_addr.i64 ss0
|
||||
; nextln: v6 = call_indirect sig0, v0(v5)
|
||||
|
||||
@@ -4,14 +4,14 @@ target x86_64 haswell
|
||||
;; Returning many f32s
|
||||
|
||||
function %return_2_f32s() -> f32, f32 {
|
||||
ebb0:
|
||||
block0:
|
||||
v0 = f32const 0x0.0
|
||||
v1 = f32const 0x1.0
|
||||
return v0, v1
|
||||
}
|
||||
|
||||
function %return_3_f32s() -> f32, f32, f32 {
|
||||
ebb0:
|
||||
block0:
|
||||
v0 = f32const 0x0.0
|
||||
v1 = f32const 0x1.0
|
||||
v2 = f32const 0x2.0
|
||||
@@ -19,7 +19,7 @@ ebb0:
|
||||
}
|
||||
|
||||
function %return_4_f32s() -> f32, f32, f32, f32 {
|
||||
ebb0:
|
||||
block0:
|
||||
v0 = f32const 0x0.0
|
||||
v1 = f32const 0x1.0
|
||||
v2 = f32const 0x2.0
|
||||
@@ -33,7 +33,7 @@ function %call() -> f32 {
|
||||
fn0 = %a() -> f32, f32
|
||||
fn1 = %b(f32, f32) -> f32, f32, f32
|
||||
fn2 = %c(f32, f32, f32) -> f32, f32, f32, f32
|
||||
ebb0:
|
||||
block0:
|
||||
v0, v1 = call fn0()
|
||||
v2, v3, v4 = call fn1(v0, v1)
|
||||
v5, v6, v7, v8 = call fn2(v2, v3, v4)
|
||||
|
||||
@@ -4,14 +4,14 @@ target x86_64 haswell
|
||||
;; Returning many f64s
|
||||
|
||||
function %return_2_f64s() -> f64, f64 {
|
||||
ebb0:
|
||||
block0:
|
||||
v0 = f64const 0x0.0
|
||||
v1 = f64const 0x1.0
|
||||
return v0, v1
|
||||
}
|
||||
|
||||
function %return_3_f64s() -> f64, f64, f64 {
|
||||
ebb0:
|
||||
block0:
|
||||
v0 = f64const 0x0.0
|
||||
v1 = f64const 0x1.0
|
||||
v2 = f64const 0x2.0
|
||||
@@ -19,7 +19,7 @@ ebb0:
|
||||
}
|
||||
|
||||
function %return_4_f64s() -> f64, f64, f64, f64 {
|
||||
ebb0:
|
||||
block0:
|
||||
v0 = f64const 0x0.0
|
||||
v1 = f64const 0x1.0
|
||||
v2 = f64const 0x2.0
|
||||
@@ -33,7 +33,7 @@ function %call() -> f64 {
|
||||
fn0 = %a() -> f64, f64
|
||||
fn1 = %b(f64, f64) -> f64, f64, f64
|
||||
fn2 = %c(f64, f64, f64) -> f64, f64, f64, f64
|
||||
ebb0:
|
||||
block0:
|
||||
v0, v1 = call fn0()
|
||||
v2, v3, v4 = call fn1(v0, v1)
|
||||
v5, v6, v7, v8 = call fn2(v2, v3, v4)
|
||||
|
||||
@@ -4,14 +4,14 @@ target x86_64 haswell
|
||||
;; Returning many i32s
|
||||
|
||||
function %return_2_i32s() -> i32, i32 {
|
||||
ebb0:
|
||||
block0:
|
||||
v0 = iconst.i32 0
|
||||
v1 = iconst.i32 1
|
||||
return v0, v1
|
||||
}
|
||||
|
||||
function %return_3_i32s() -> i32, i32, i32 {
|
||||
ebb0:
|
||||
block0:
|
||||
v0 = iconst.i32 0
|
||||
v1 = iconst.i32 1
|
||||
v2 = iconst.i32 2
|
||||
@@ -19,7 +19,7 @@ ebb0:
|
||||
}
|
||||
|
||||
function %return_4_i32s() -> i32, i32, i32, i32 {
|
||||
ebb0:
|
||||
block0:
|
||||
v0 = iconst.i32 0
|
||||
v1 = iconst.i32 1
|
||||
v2 = iconst.i32 2
|
||||
@@ -33,7 +33,7 @@ function %call() -> i32 {
|
||||
fn0 = %a() -> i32, i32
|
||||
fn1 = %b(i32, i32) -> i32, i32, i32
|
||||
fn2 = %c(i32, i32, i32) -> i32, i32, i32, i32
|
||||
ebb0:
|
||||
block0:
|
||||
v0, v1 = call fn0()
|
||||
v2, v3, v4 = call fn1(v0, v1)
|
||||
v5, v6, v7, v8 = call fn2(v2, v3, v4)
|
||||
|
||||
@@ -4,14 +4,14 @@ target x86_64 haswell
|
||||
;; Returning many i64s
|
||||
|
||||
function %return_2_i64s() -> i64, i64 {
|
||||
ebb0:
|
||||
block0:
|
||||
v0 = iconst.i64 0
|
||||
v1 = iconst.i64 1
|
||||
return v0, v1
|
||||
}
|
||||
|
||||
function %return_3_i64s() -> i64, i64, i64 {
|
||||
ebb0:
|
||||
block0:
|
||||
v0 = iconst.i64 0
|
||||
v1 = iconst.i64 1
|
||||
v2 = iconst.i64 2
|
||||
@@ -19,7 +19,7 @@ ebb0:
|
||||
}
|
||||
|
||||
function %return_4_i64s() -> i64, i64, i64, i64 {
|
||||
ebb0:
|
||||
block0:
|
||||
v0 = iconst.i64 0
|
||||
v1 = iconst.i64 1
|
||||
v2 = iconst.i64 2
|
||||
@@ -33,7 +33,7 @@ function %call() -> i64 {
|
||||
fn0 = %a() -> i64, i64
|
||||
fn1 = %b(i64, i64) -> i64, i64, i64
|
||||
fn2 = %c(i64, i64, i64) -> i64, i64, i64, i64
|
||||
ebb0:
|
||||
block0:
|
||||
v0, v1 = call fn0()
|
||||
v2, v3, v4 = call fn1(v0, v1)
|
||||
v5, v6, v7, v8 = call fn2(v2, v3, v4)
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -16,7 +16,7 @@ function %foo() -> i32, f32 {
|
||||
; nextln: fn0 = %f sig0
|
||||
; nextln: fn1 = %g sig1
|
||||
|
||||
ebb0:
|
||||
block0:
|
||||
v0, v1, v2, v3, v4 = call fn0()
|
||||
; check: v18 = stack_addr.i64 ss0
|
||||
; nextln: v25 = func_addr.i64 fn0
|
||||
|
||||
@@ -7,8 +7,8 @@ target x86_64 haswell
|
||||
function %returner() -> i8, i32, i8, i64 {
|
||||
; check: function %returner(i64 sret [%rdi]) -> i64 sret [%rax] fast {
|
||||
|
||||
ebb0:
|
||||
; check: ebb0(v4: i64):
|
||||
block0:
|
||||
; check: block0(v4: i64):
|
||||
|
||||
v0 = iconst.i8 0
|
||||
v1 = iconst.i32 1
|
||||
@@ -31,7 +31,7 @@ function %caller() {
|
||||
; check: sig0 = (i64 sret [%rdi]) -> i64 sret [%rax] fast
|
||||
; nextln: fn0 = %returner sig0
|
||||
|
||||
ebb0:
|
||||
block0:
|
||||
v0, v1, v2, v3 = call fn0()
|
||||
; check: v4 = stack_addr.i64 ss0
|
||||
; nextln: v10 = func_addr.i64 fn0
|
||||
|
||||
@@ -2,13 +2,13 @@ test compile
|
||||
target x86_64 haswell
|
||||
|
||||
function %returner(i32, i64, f32, f64) -> i32, i64, f32, f64 {
|
||||
ebb0(v0: i32, v1: i64, v2: f32, v3: f64):
|
||||
block0(v0: i32, v1: i64, v2: f32, v3: f64):
|
||||
return v0, v1, v2, v3
|
||||
}
|
||||
|
||||
function %caller() {
|
||||
fn0 = %returner(i32, i64, f32, f64) -> i32, i64, f32, f64
|
||||
ebb0:
|
||||
block0:
|
||||
v0 = iconst.i32 0
|
||||
v1 = iconst.i64 1
|
||||
v2 = f32const 0x2.0
|
||||
|
||||
@@ -2,7 +2,7 @@ test compile
|
||||
target x86_64 haswell
|
||||
|
||||
function %return_20_i32s() -> i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32 {
|
||||
ebb0:
|
||||
block0:
|
||||
v0 = iconst.i32 0
|
||||
v1 = iconst.i32 1
|
||||
v2 = iconst.i32 2
|
||||
@@ -28,7 +28,7 @@ ebb0:
|
||||
|
||||
function %call_20_i32s() {
|
||||
fn0 = %return_20_i32s() -> i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32
|
||||
ebb0:
|
||||
block0:
|
||||
v0, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19 = call fn0()
|
||||
return
|
||||
}
|
||||
|
||||
@@ -7,11 +7,11 @@ set enable_safepoints=true
|
||||
target i686 haswell
|
||||
|
||||
function %select_ref(i32, r32, r32) -> r32 {
|
||||
ebb0(v0: i32, v1: r32, v2: r32):
|
||||
brz v0, ebb1(v2)
|
||||
jump ebb1(v1)
|
||||
block0(v0: i32, v1: r32, v2: r32):
|
||||
brz v0, block1(v2)
|
||||
jump block1(v1)
|
||||
|
||||
ebb1(v3: r32):
|
||||
block1(v3: r32):
|
||||
return v3
|
||||
}
|
||||
|
||||
@@ -21,7 +21,7 @@ function %table_set(i32, r32, i32 vmctx) {
|
||||
gv2 = load.i32 notrap aligned gv0 +4
|
||||
table0 = dynamic gv1, element_size 1, bound gv2, index_type i32
|
||||
|
||||
ebb0(v0: i32, v1: r32, v2: i32):
|
||||
block0(v0: i32, v1: r32, v2: i32):
|
||||
v3 = table_addr.i32 table0, v0, +0;
|
||||
store.r32 notrap aligned v1, v3
|
||||
return
|
||||
@@ -33,7 +33,7 @@ function %table_get(i32, i32 vmctx) -> r32 {
|
||||
gv2 = load.i32 notrap aligned gv0 +4
|
||||
table0 = dynamic gv1, element_size 1, bound gv2, index_type i32
|
||||
|
||||
ebb0(v0: i32, v1: i32):
|
||||
block0(v0: i32, v1: i32):
|
||||
v2 = table_addr.i32 table0, v0, +0;
|
||||
v3 = load.r32 notrap aligned v2
|
||||
return v3
|
||||
@@ -44,7 +44,7 @@ function %test_refs(r32, r32, r32, i32 vmctx) {
|
||||
fn1 = %table_set(i32, r32, i32 vmctx)
|
||||
fn2 = %table_get(i32, i32 vmctx) -> r32
|
||||
|
||||
ebb0(v0: r32, v1: r32, v2: r32, v3: i32):
|
||||
block0(v0: r32, v1: r32, v2: r32, v3: i32):
|
||||
v4 = iconst.i32 0
|
||||
v5 = iconst.i32 1
|
||||
v8 = iconst.i32 2
|
||||
|
||||
@@ -7,11 +7,11 @@ set enable_safepoints=true
|
||||
target x86_64 haswell
|
||||
|
||||
function %select_ref(i32, r64, r64) -> r64 {
|
||||
ebb0(v0: i32, v1: r64, v2: r64):
|
||||
brz v0, ebb1(v2)
|
||||
jump ebb1(v1)
|
||||
block0(v0: i32, v1: r64, v2: r64):
|
||||
brz v0, block1(v2)
|
||||
jump block1(v1)
|
||||
|
||||
ebb1(v3: r64):
|
||||
block1(v3: r64):
|
||||
return v3
|
||||
}
|
||||
|
||||
@@ -21,7 +21,7 @@ function %table_set(i32, r64, i64 vmctx) {
|
||||
gv2 = load.i32 notrap aligned gv0 +8
|
||||
table0 = dynamic gv1, element_size 1, bound gv2, index_type i32
|
||||
|
||||
ebb0(v0: i32, v1: r64, v2: i64):
|
||||
block0(v0: i32, v1: r64, v2: i64):
|
||||
v3 = table_addr.i64 table0, v0, +0;
|
||||
store.r64 notrap aligned v1, v3
|
||||
return
|
||||
@@ -33,7 +33,7 @@ function %table_get(i32, i64 vmctx) -> r64 {
|
||||
gv2 = load.i32 notrap aligned gv0 +8
|
||||
table0 = dynamic gv1, element_size 1, bound gv2, index_type i32
|
||||
|
||||
ebb0(v0: i32, v1: i64):
|
||||
block0(v0: i32, v1: i64):
|
||||
v2 = table_addr.i64 table0, v0, +0;
|
||||
v3 = load.r64 notrap aligned v2
|
||||
return v3
|
||||
@@ -44,7 +44,7 @@ function %test_refs(r64, r64, r64, i64 vmctx) {
|
||||
fn1 = %table_set(i32, r64, i64 vmctx)
|
||||
fn2 = %table_get(i32, i64 vmctx) -> r64
|
||||
|
||||
ebb0(v0: r64, v1: r64, v2: r64, v3: i64):
|
||||
block0(v0: r64, v1: r64, v2: r64, v3: i64):
|
||||
v4 = iconst.i32 0
|
||||
v5 = iconst.i32 1
|
||||
v8 = iconst.i32 2
|
||||
|
||||
@@ -6,25 +6,25 @@ target i686 haswell
|
||||
target x86_64 haswell
|
||||
|
||||
function %select_i32(i32, i32, i32) -> i32 {
|
||||
ebb0(v0: i32, v1: i32, v2: i32):
|
||||
block0(v0: i32, v1: i32, v2: i32):
|
||||
v3 = select v2, v0, v1
|
||||
return v3
|
||||
}
|
||||
|
||||
function %select_i64(i64, i64, i32) -> i64 {
|
||||
ebb0(v0: i64, v1: i64, v2: i32):
|
||||
block0(v0: i64, v1: i64, v2: i32):
|
||||
v3 = select v2, v0, v1
|
||||
return v3
|
||||
}
|
||||
|
||||
function %select_f32(f32, f32, i32) -> f32 {
|
||||
ebb0(v0: f32, v1: f32, v2: i32):
|
||||
block0(v0: f32, v1: f32, v2: i32):
|
||||
v3 = select v2, v0, v1
|
||||
return v3
|
||||
}
|
||||
|
||||
function %select_f64(f64, f64, i32) -> f64 {
|
||||
ebb0(v0: f64, v1: f64, v2: i32):
|
||||
block0(v0: f64, v1: f64, v2: i32):
|
||||
v3 = select v2, v0, v1
|
||||
return v3
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user