If std2f gets an 64-bit immediate argument, it doesn't convert it, but simply writes it out to memory. The attached patch fixes this by rewriting the special case for immediate values. (Note that this bug is triggered by tests/basic/testTypedArrays.)
Created attachment 451936 [details] [diff] [review] Add a lirasm test for LIR_std2f. I'm not sure if this is a good way to implement the test as it relies on the back-end having support for LIR_std2f. MIPS and SPARC lack this, for example. If this makes the test significantly undesirable, I'm not too worried, as it is already caught by testTypedArrays in Trace Monkey anyway, but it'd be nice to have a lirasm test if possible.
Attachment #451936 - Flags: review?(nnethercote)
Created attachment 451938 [details] [diff] [review] Fix LIR_std2f(imm). Tested on nanojit-central and tracemonkey. I will test on tamarin-redux shortly. (Tamarin's test suite takes forever on ARM.)
Attachment #451938 - Flags: review?(vladimir)
Attachment #451938 - Flags: review?(vladimir) → review+
Comment on attachment 451936 [details] [diff] [review] Add a lirasm test for LIR_std2f. I say don't worry about MIPS and Sparc for testing purposes, as they're not on the NJ tinderbox and I don't want to compromise the testing of primary platforms because of shortcomings in secondary platforms. Also, this may spur the addition of LIR_std2f on those platforms.
Attachment #451936 - Flags: review?(nnethercote) → review+
Whiteboard: fixed-in-nanojit → fixed-in-nanojit, fixed-in-tamarin
Whiteboard: fixed-in-nanojit, fixed-in-tamarin → fixed-in-nanojit, fixed-in-tamarin, fixed-in-tracemonkey
Status: ASSIGNED → RESOLVED
Last Resolved: 8 years ago
Resolution: --- → FIXED
Component: Nanojit → Nanojit
Product: Core → Core Graveyard
You need to log in before you can comment on or make changes to this bug.