mirror of
https://github.com/dlang/dmd.git
synced 2025-04-26 13:10:12 +03:00
fix Issue 24181 - reading double parameter from RCX rather than XMM1 (#15707)
This commit is contained in:
parent
ba98090885
commit
8f5764ecbf
2 changed files with 16 additions and 1 deletions
|
@ -1402,7 +1402,7 @@ void getlvalue(ref CodeBuilder cdb,code *pcs,elem *e,regm_t keepmsk)
|
|||
if (preg != NOREG && regcon.params & mask(preg))
|
||||
{
|
||||
//printf("sz %d, preg %s, Voffset %d\n", cast(int)sz, regm_str(mask(preg)), cast(int)voffset);
|
||||
if (mask(preg) & XMMREGS && sz != REGSIZE)
|
||||
if (mask(preg) & XMMREGS)
|
||||
{
|
||||
/* The following fails with this from std.math on Linux64:
|
||||
void main()
|
||||
|
|
15
compiler/test/runnable/test24181.c
Normal file
15
compiler/test/runnable/test24181.c
Normal file
|
@ -0,0 +1,15 @@
|
|||
// https://issues.dlang.org/show_bug.cgi?id=24181
|
||||
|
||||
#include <assert.h>
|
||||
|
||||
unsigned equ(double x, double y)
|
||||
{
|
||||
return *(long long *)&x == *(long long *)&y;
|
||||
}
|
||||
|
||||
int main()
|
||||
{
|
||||
assert(equ(1.0, 2.0) == 0);
|
||||
assert(equ(527, 527) != 0);
|
||||
return 0;
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue