baseline-bytereg.js (1055B)
1 // Bug 1322450 is about the baseline compiler not properly handling a byte store 2 // from a wider datum on 32-bit x86 because it does not move the value to be 3 // stored to a valid byte register if it is in a 32-bit register that does not 4 // have a byte part (EDI/ESI/EBP). 5 // 6 // This test is white-box because it knows about the register allocation order: 7 // the two values pushed onto the stack occupy EAX and ECX, and the i64.store8 8 // will use EDX for the index and (EDI or ESI or EBP) for the low register of 9 // the value to be stored. The i64.store8 instruction will then assert in the 10 // assembler. 11 // 12 // If the baseline compiler starts allocating registers in a different order 13 // then this test will be ineffective. 14 15 wasmEvalText(`(module 16 (memory 1) 17 (func $run (param i64) (param i32) (param i32) 18 local.get 1 19 local.get 2 20 i32.add 21 22 local.get 1 23 local.get 2 24 i32.add 25 26 i32.const 0 27 local.get 0 28 i64.store8 29 30 drop 31 drop 32 ) 33 (export "run" (func $run)) 34 )`);