wazevo(amd64): alignment for Fmax/min (#2084)
Signed-off-by: Takeshi Yoneda <t.y.mathetake@gmail.com>
This commit is contained in:
@@ -2171,7 +2171,8 @@ func (m *machine) lowerFminFmax(instr *ssa.Instruction) {
|
||||
|
||||
xDef, yDef := m.c.ValueDefinition(x), m.c.ValueDefinition(y)
|
||||
rm := m.getOperand_Reg(xDef)
|
||||
rn := m.getOperand_Mem_Reg(yDef)
|
||||
// We cannot ensure that y is aligned to 16 bytes, so we have to use it on reg.
|
||||
rn := m.getOperand_Reg(yDef)
|
||||
rd := m.c.VRegOf(instr.Return())
|
||||
|
||||
tmp := m.copyToTmp(rm.reg())
|
||||
|
||||
@@ -1018,3 +1018,10 @@ func Test2082(t *testing.T) {
|
||||
}
|
||||
nodiff.RequireNoDiffT(t, getWasmBinary(t, "2082"), true, true)
|
||||
}
|
||||
|
||||
func Test2084(t *testing.T) {
|
||||
if !platform.CompilerSupported() {
|
||||
return
|
||||
}
|
||||
nodiff.RequireNoDiffT(t, getWasmBinary(t, "2084"), true, true)
|
||||
}
|
||||
|
||||
BIN
internal/integration_test/fuzzcases/testdata/2084.wasm
vendored
Normal file
BIN
internal/integration_test/fuzzcases/testdata/2084.wasm
vendored
Normal file
Binary file not shown.
20
internal/integration_test/fuzzcases/testdata/2084.wat
vendored
Normal file
20
internal/integration_test/fuzzcases/testdata/2084.wat
vendored
Normal file
@@ -0,0 +1,20 @@
|
||||
(module
|
||||
(type (;0;) (func (param i32 f64)))
|
||||
(func (;0;) (type 0) (param i32 f64)
|
||||
(local i32 f32 f32)
|
||||
i32.const 0
|
||||
if ;; label = @1
|
||||
unreachable
|
||||
end
|
||||
f32.const 0x0p+0 (;=0;)
|
||||
memory.size
|
||||
f32.load offset=93531 align=2
|
||||
f32.max
|
||||
i32.reinterpret_f32
|
||||
i32.const 0
|
||||
i32.xor
|
||||
global.set 0
|
||||
)
|
||||
(memory (;0;) 6 8)
|
||||
(global (;0;) (mut i32) i32.const 0)
|
||||
(export "" (func 0)))
|
||||
Reference in New Issue
Block a user