[Issue 1539] New: X86 inline assembler fails to recognize when the branch address outside range
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Fri Sep 28 18:08:17 PDT 2007
http://d.puremagic.com/issues/show_bug.cgi?id=1539
Summary: X86 inline assembler fails to recognize when the branch
address outside range
Product: D
Version: 1.021
Platform: PC
OS/Version: Windows
Status: NEW
Severity: minor
Priority: P2
Component: DMD
AssignedTo: bugzilla at digitalmars.com
ReportedBy: grahamc001uk at yahoo.co.uk
Inline assembler for X86 platform fails to recognize when the branch address of
a loop assembler instruction falls outside of the -128 .. +127 range.
Test program:
// Compiled with Digital Mars D Compiler v1.021
// on Windows XP.
import std.stdio;
void main() {
writefln("start of loop");
asm {
mov ECX,10 ;
next: ;
// when the number of nop is increased to 127 the program
fails.
// with 126 or less it works.
nop ;
nop ;
nop ;
nop ;
nop ;
loop next ;
}
writefln("end of loop");
}
on failure produces the output:
start of loop
Error: Access Violation
despite compiling without any errors or warnings.
I classified as minor as I doubt if many people will be hit by it.
Only those writing more complex inline assembler code.
--
More information about the Digitalmars-d-bugs
mailing list