VirtualBox

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

最後變更 在這個檔案從63639是 61141,由 vboxsync 提交於 9 年 前

tstAsmStructAsm-lst.sed: Prep for upcoming CPUMHOSTCTX change.

  • 屬性 svn:eol-style 設為 LF
  • 屬性 svn:keywords 設為 Id
檔案大小: 1.2 KB
 
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
25/^\.[[:alpha:]_][[:alnum:]_.:]*:$/b member_alias
26b error
27b member_two
28
29
30#
31# Struct start / end.
32#
33:struct_equ
34s/_size EQU.*$/_size/
35:struct
36s/:$//
37h
38s/^/global /
39s/$/ ; struct/
40b end
41
42
43#
44# Struct member
45# Note: the 't' command doesn't seem to be working right with 's'.
46#
47:member
48s/[[:xdigit:]]* *//
49s/<gap> *//
50/^\.[[:alnum:]_.]*[:]* .*$/!t error
51s/\(\.[[:alnum:]_]*\)[:]* .*$/\1 /
52G
53s/^\([^ ]*\) \(.*\)$/global \2\1 ; member/
54s/\n//m
55
56b end
57
58
59#
60# Struct member, no address. yasm r1842 and later.
61#
62:member_two
63s/[:]* *res[bwdtq] .*$//
64s/$/ /
65/^\.[[:alnum:]_.]* *$/!t error
66G
67s/^\([^ ]*\) \(.*\)$/global \2\1 ; member2/
68s/\n//m
69
70b end
71
72#
73# Alias member like Host.cr0Fpu in 64-bit. Drop it.
74#
75:member_alias
76d
77b end
78
79:error
80s/^/\nSed script logic error!\nBuffer: /
81s/$/\nHold: /
82G
83q 1
84b end
85
86
87:end
88
注意: 瀏覽 TracBrowser 來幫助您使用儲存庫瀏覽器

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