annotate compile/a/asm_offset_02_A.d @ 1630:d0efa3ae5522 default tip

run/mini/naked_asm5: New x86_64 ABI passes the arguments in reverse order.
author David Nadlinger <code@klickverbot.at>
date Sat, 23 Apr 2011 22:57:32 +0200
parents b8c0195059d9
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
1053
136829b474f9 <pmoore_member@pathlink.com>
thomask
parents:
diff changeset
1 // $HeadURL$
136829b474f9 <pmoore_member@pathlink.com>
thomask
parents:
diff changeset
2 // $Date$
136829b474f9 <pmoore_member@pathlink.com>
thomask
parents:
diff changeset
3 // $Author$
136829b474f9 <pmoore_member@pathlink.com>
thomask
parents:
diff changeset
4
136829b474f9 <pmoore_member@pathlink.com>
thomask
parents:
diff changeset
5 // @author@ <pmoore_member@pathlink.com>
136829b474f9 <pmoore_member@pathlink.com>
thomask
parents:
diff changeset
6 // @date@ 2006-06-21
1489
b8c0195059d9 changed nntp: URLs to http: URLs
thomask
parents: 1053
diff changeset
7 // @uri@ http://www.digitalmars.com/pnews/read.php?server=news.digitalmars.com&group=digitalmars.D.bugs&artnum=7627
1053
136829b474f9 <pmoore_member@pathlink.com>
thomask
parents:
diff changeset
8
136829b474f9 <pmoore_member@pathlink.com>
thomask
parents:
diff changeset
9 module dstress.compile.a.asm_offset_02_A;
136829b474f9 <pmoore_member@pathlink.com>
thomask
parents:
diff changeset
10
136829b474f9 <pmoore_member@pathlink.com>
thomask
parents:
diff changeset
11 version(D_InlineAsm_X86){
136829b474f9 <pmoore_member@pathlink.com>
thomask
parents:
diff changeset
12 version = runTest;
136829b474f9 <pmoore_member@pathlink.com>
thomask
parents:
diff changeset
13 }
136829b474f9 <pmoore_member@pathlink.com>
thomask
parents:
diff changeset
14
136829b474f9 <pmoore_member@pathlink.com>
thomask
parents:
diff changeset
15 version(runTest){
136829b474f9 <pmoore_member@pathlink.com>
thomask
parents:
diff changeset
16 const int CONST_OFFSET = 10;
136829b474f9 <pmoore_member@pathlink.com>
thomask
parents:
diff changeset
17
136829b474f9 <pmoore_member@pathlink.com>
thomask
parents:
diff changeset
18 int main(){
136829b474f9 <pmoore_member@pathlink.com>
thomask
parents:
diff changeset
19 asm{
136829b474f9 <pmoore_member@pathlink.com>
thomask
parents:
diff changeset
20 mov EDI, 10;
136829b474f9 <pmoore_member@pathlink.com>
thomask
parents:
diff changeset
21 mov EAX, [EDI + CONST_OFFSET];
136829b474f9 <pmoore_member@pathlink.com>
thomask
parents:
diff changeset
22 }
136829b474f9 <pmoore_member@pathlink.com>
thomask
parents:
diff changeset
23
136829b474f9 <pmoore_member@pathlink.com>
thomask
parents:
diff changeset
24 return 0;
136829b474f9 <pmoore_member@pathlink.com>
thomask
parents:
diff changeset
25 }
136829b474f9 <pmoore_member@pathlink.com>
thomask
parents:
diff changeset
26 }else{
136829b474f9 <pmoore_member@pathlink.com>
thomask
parents:
diff changeset
27 pragma(msg, "DSTRESS{XFAIL}: no inline ASM support");
136829b474f9 <pmoore_member@pathlink.com>
thomask
parents:
diff changeset
28 static assert(0);
136829b474f9 <pmoore_member@pathlink.com>
thomask
parents:
diff changeset
29 }
136829b474f9 <pmoore_member@pathlink.com>
thomask
parents:
diff changeset
30