https://issues.dlang.org/show_bug.cgi?id=16274
Dlang Bot changed:
What|Removed |Added
Status|NEW |RESOLVED
Resolution|---
https://issues.dlang.org/show_bug.cgi?id=16274
--- Comment #6 from Dlang Bot ---
@ibuclaw created dlang/dmd pull request #11719 "fix Issue 16274 - short
argument passed in 16 bit register" fixing this issue:
- fix Issue 16274 - short argument passed in 16 bit register
https://github.com/dlang/d
---
@WalterBright created dlang/dmd pull request #11651 "fix Issue 16274 - The
curses of debugging: short argument passed in 1…" fixing this issue:
- fix Issue 16274 - The curses of debugging: short argument passed in 16-bit
register, against ABI
https://github.com/dlang/dmd/pull/11651
--
https://issues.dlang.org/show_bug.cgi?id=16274
--- Comment #4 from Walter Bright ---
Curiously, I implemented init_pair() and it turns out that gcc sign extends
each parameter before using it.
So this problem does depend on what's going on with init_pair's implementation.
--
https://issues.dlang.org/show_bug.cgi?id=16274
--- Comment #3 from Walter Bright ---
gcc, however, does indeed set the upper 16 bits to zero. I suppose dmd should
behave the same way, regardless of the spec.
--
https://issues.dlang.org/show_bug.cgi?id=16274
--- Comment #2 from Walter Bright ---
A smaller version:
extern(C) int init_pair(short pair, short f, short b);
void test() { init_pair(1, 2, 3); }
which generates:
_D4testQfFZv:
pushRBP
mov RBP,RSP
mov 8D
https://issues.dlang.org/show_bug.cgi?id=16274
Walter Bright changed:
What|Removed |Added
Keywords||backend
CC|
https://issues.dlang.org/show_bug.cgi?id=16274
ag0ae...@gmail.com changed:
What|Removed |Added
Keywords||wrong-code
CC|
https://issues.dlang.org/show_bug.cgi?id=16274
Luís Marques changed:
What|Removed |Added
Hardware|x86 |x86_64
Severity|enhancement