VirtualBox

source: vbox/trunk/src/VBox/VMM/testcase/tstAsmStructsAsm-lst.sed@ 47565

Last change on this file since 47565 was 39398, checked in by vboxsync, 13 years ago

yasm 1.2.0 fix.

  • Property svn:eol-style set to LF
  • Property svn:keywords set to Id
File size: 1.1 KB
Line 
1#
2# Strip stuff lines and spaces we don't care about.
3#
4/ %line /d
5/\[section /d
6/\[bits /d
7/\[absolute /d
8/ times /d
9s/ *[[:digit:]]* //
10/^ *$/d
11s/ *$//g
12s/^ *//g
13/^\.text$/d
14/^\.data$/d
15/^\.bss$/d
16s/[[:space:]][[:space:]]*/ /g
17
18#
19# Figure which type of line this is and process it accordingly.
20#
21/^[[:alpha:]_][[:alnum:]_]*:/b struct
22/^[[:alpha:]_][[:alnum:]_]*_size EQU \$ - .*$/b struct_equ
23/<gap>/b member
24/^\.[[:alpha:]_][[:alnum:]_.:]* res.*$/b member_two
25b error
26b member_two
27
28
29#
30# Struct start / end.
31#
32:struct_equ
33s/_size EQU.*$/_size/
34:struct
35s/:$//
36h
37s/^/global /
38s/$/ ; struct/
39b end
40
41
42#
43# Struct member
44# Note: the 't' command doesn't seem to be working right with 's'.
45#
46:member
47s/[[:xdigit:]]* *//
48s/<gap> *//
49/^\.[[:alnum:]_.]*[:]* .*$/!t error
50s/\(\.[[:alnum:]_]*\)[:]* .*$/\1 /
51G
52s/^\([^ ]*\) \(.*\)$/global \2\1 ; member/
53s/\n//m
54
55b end
56
57
58#
59# Struct member, no address. yasm r1842 and later.
60#
61:member_two
62s/[:]* *res[bwdtq] .*$//
63s/$/ /
64/^\.[[:alnum:]_.]* *$/!t error
65G
66s/^\([^ ]*\) \(.*\)$/global \2\1 ; member2/
67s/\n//m
68
69b end
70
71
72:error
73s/^/\nSed script logic error!\nBuffer: /
74s/$/\nHold: /
75G
76q 1
77b end
78
79
80:end
81
Note: See TracBrowser for help on using the repository browser.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette