Bug 9863 – Incorrect generation of SAHF instruction on 64 bits

Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
x86_64
OS
All
Creation time
2013-04-02T12:21:00Z
Last change time
2015-06-09T05:11:56Z
Assigned to
nobody
Creator
bugzilla

Comments

Comment #0 by bugzilla — 2013-04-02T12:21:12Z
The SAHF instruction does not exist on early 64 bit CPUs, so dmd should not generate it. Example code that does: bool foo(creal c) { return c != 0; } This will cause an illegal instruction fault on older 64 bit CPUs.
Comment #1 by bugzilla — 2013-04-02T13:59:31Z
Comment #2 by github-bugzilla — 2013-04-02T20:30:14Z
Commits pushed to master at https://github.com/D-Programming-Language/dmd https://github.com/D-Programming-Language/dmd/commit/47765afdf90a1b658dc546e2dfdb576367ce3a7a fix Issue 9863 - Incorrect generation of SAHF instruction on 64 bits https://github.com/D-Programming-Language/dmd/commit/57005973408fd82adf1f7d544ceae4f53beb7fcd Merge pull request #1827 from WalterBright/fix9863 fix Issue 9863 - Incorrect generation of SAHF instruction on 64 bits
Comment #3 by yebblies — 2013-04-02T20:31:25Z
Fixed D2.
Comment #4 by yebblies — 2013-04-03T02:21:18Z
Where is the D1 commit? Or did this never really apply to D1?
Comment #5 by bugzilla — 2013-04-03T02:28:34Z
Comment #6 by yebblies — 2013-04-03T02:31:04Z