annotate run/reverse_06.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
475
3938ed0560eb char/dchar/wchar[].revers
thomask
parents:
diff changeset
1 // $HeadURL$
3938ed0560eb char/dchar/wchar[].revers
thomask
parents:
diff changeset
2 // $Date$
3938ed0560eb char/dchar/wchar[].revers
thomask
parents:
diff changeset
3 // $Author$
3938ed0560eb char/dchar/wchar[].revers
thomask
parents:
diff changeset
4
3938ed0560eb char/dchar/wchar[].revers
thomask
parents:
diff changeset
5 // @author@ Thomas Kuehne <thomas-dloop@kuehne.thisisspam.cn>
3938ed0560eb char/dchar/wchar[].revers
thomask
parents:
diff changeset
6 // @date@ 2005-04-23
1489
b8c0195059d9 changed nntp: URLs to http: URLs
thomask
parents: 475
diff changeset
7 // @uri@ http://www.digitalmars.com/pnews/read.php?server=news.digitalmars.com&group=digitalmars.D.bugs&artnum=3791
475
3938ed0560eb char/dchar/wchar[].revers
thomask
parents:
diff changeset
8
3938ed0560eb char/dchar/wchar[].revers
thomask
parents:
diff changeset
9 module dstress.run.reverse_06;
3938ed0560eb char/dchar/wchar[].revers
thomask
parents:
diff changeset
10
3938ed0560eb char/dchar/wchar[].revers
thomask
parents:
diff changeset
11 int main(){
3938ed0560eb char/dchar/wchar[].revers
thomask
parents:
diff changeset
12 wchar[] a;
3938ed0560eb char/dchar/wchar[].revers
thomask
parents:
diff changeset
13 wchar[] r;
3938ed0560eb char/dchar/wchar[].revers
thomask
parents:
diff changeset
14
3938ed0560eb char/dchar/wchar[].revers
thomask
parents:
diff changeset
15 a = "abcd";
3938ed0560eb char/dchar/wchar[].revers
thomask
parents:
diff changeset
16 a = a.dup;
3938ed0560eb char/dchar/wchar[].revers
thomask
parents:
diff changeset
17 r = a.reverse;
3938ed0560eb char/dchar/wchar[].revers
thomask
parents:
diff changeset
18 assert(r=="dcba");
3938ed0560eb char/dchar/wchar[].revers
thomask
parents:
diff changeset
19 assert(r.ptr==a.ptr);
3938ed0560eb char/dchar/wchar[].revers
thomask
parents:
diff changeset
20
3938ed0560eb char/dchar/wchar[].revers
thomask
parents:
diff changeset
21 a = "-\U000000A1\U00000901\U0000FFEE\U00010000\U000FFFFD_";
3938ed0560eb char/dchar/wchar[].revers
thomask
parents:
diff changeset
22 a = a.dup;
3938ed0560eb char/dchar/wchar[].revers
thomask
parents:
diff changeset
23 r = a.reverse;
3938ed0560eb char/dchar/wchar[].revers
thomask
parents:
diff changeset
24 assert(r == "_\U000FFFFD\U00010000\U0000FFEE\U00000901\U000000A1-");
3938ed0560eb char/dchar/wchar[].revers
thomask
parents:
diff changeset
25 assert(a.ptr==r.ptr);
3938ed0560eb char/dchar/wchar[].revers
thomask
parents:
diff changeset
26
3938ed0560eb char/dchar/wchar[].revers
thomask
parents:
diff changeset
27 return 0;
3938ed0560eb char/dchar/wchar[].revers
thomask
parents:
diff changeset
28 }