digitalmars.D.bugs - [Issue 1539] New: X86 inline assembler fails to recognize when the branch address outside range
- d-bugmail puremagic.com (43/43) Sep 28 2007 http://d.puremagic.com/issues/show_bug.cgi?id=1539
- d-bugmail puremagic.com (12/12) Sep 30 2007 http://d.puremagic.com/issues/show_bug.cgi?id=1539
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 digitalmars.com
ReportedBy: grahamc001uk 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.
--
Sep 28 2007
http://d.puremagic.com/issues/show_bug.cgi?id=1539
thomas-dloop kuehne.cn changed:
What |Removed |Added
----------------------------------------------------------------------------
OS/Version|Windows |All
Added to DStress as
http://dstress.kuehne.cn/run/a/asm_loop_02_A.d
http://dstress.kuehne.cn/nocompile/a/asm_loop_02_B.d
http://dstress.kuehne.cn/run/a/asm_loop_02_C.d
http://dstress.kuehne.cn/nocompile/a/asm_loop_02_D.d
--
Sep 30 2007








d-bugmail puremagic.com