Use little-endian ordering for CLIF vconst immediate

Examining wasm-objdump revealed that it stores SIMD constants in little-endian order, e.g.:

000071 func[2] <test_const>:
 000072: fd 02 01 00 00 00 02 00 00 | v128.const 0x00000001 0x00000002 0x00000003 0x00000004
 00007b: 00 03 00 00 00 04 00 00 00 |
 000084: fd 0d 03                   | i32x4.extract_lane 3
 000087: 0b                         | end

This change avoids confusion by making the CLIF representation use little-endian order as well.
This commit is contained in:
Andrew Brown
2019-08-02 13:27:13 -07:00
committed by Dan Gohman
parent cb041407c1
commit 020e5987d3
2 changed files with 22 additions and 6 deletions

View File

@@ -10,4 +10,4 @@ ebb0:
return v0
}
; sameln: [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 12, 34]
; sameln: [34, 12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]