VirtualBox

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

最後變更 在這個檔案從91281是 91281,由 vboxsync 提交於 4 年 前

VMM/CPUM,++: Moved the guest's extended state (XState) from the hyper heap and into CPUMCTX. bugref:10093

  • 屬性 svn:eol-style 設為 LF
  • 屬性 svn:keywords 設為 Id
檔案大小: 1.9 KB
 
1# $Id: tstAsmStructsAsm-lst.sed 91281 2021-09-16 13:32:18Z vboxsync $
2## @file
3# For testing assembly struct when using yasm.
4#
5
6#
7# Copyright (C) 2006-2020 Oracle Corporation
8#
9# This file is part of VirtualBox Open Source Edition (OSE), as
10# available from http://www.alldomusa.eu.org. This file is free software;
11# you can redistribute it and/or modify it under the terms of the GNU
12# General Public License (GPL) as published by the Free Software
13# Foundation, in version 2 as it comes in the "COPYING" file of the
14# VirtualBox OSE distribution. VirtualBox OSE is distributed in the
15# hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
16#
17
18#
19# Strip stuff lines and spaces we don't care about.
20#
21/ %line /d
22/\[section /d
23/\[bits /d
24/\[absolute /d
25/ times /d
26s/ *[[:digit:]]* //
27/^ *$/d
28s/ *$//g
29s/^ *//g
30/^\.text$/d
31/^\.data$/d
32/^\.bss$/d
33s/[[:space:]][[:space:]]*/ /g
34
35#
36# Figure which type of line this is and process it accordingly.
37#
38/^[[:alpha:]_][[:alnum:]_]*:/b struct
39/^[[:alpha:]_][[:alnum:]_]*_size EQU \$ - .*$/b struct_equ
40/<gap>/b member
41/^\.[[:alpha:]_][[:alnum:]_.:]* res.*$/b member_two
42/^\.[[:alpha:]_][[:alnum:]_.:]* EQU .*$/b member_two
43/^\.[[:alpha:]_][[:alnum:]_.:]*:$/b member_alias
44b error
45b member_two
46
47
48#
49# Struct start / end.
50#
51:struct_equ
52s/_size EQU.*$/_size/
53:struct
54s/:$//
55h
56s/^/global /
57s/$/ ; struct/
58b end
59
60
61#
62# Struct member
63# Note: the 't' command doesn't seem to be working right with 's'.
64#
65:member
66s/[[:xdigit:]]* *//
67s/<gap> *//
68/^\.[[:alnum:]_.]*[:]* .*$/!t error
69s/\(\.[[:alnum:]_]*\)[:]* .*$/\1 /
70G
71s/^\([^ ]*\) \(.*\)$/global \2\1 ; member/
72s/\n//m
73
74b end
75
76
77#
78# Struct member, no address. yasm r1842 and later.
79#
80:member_two
81s/[:]* *res[bwdtq] .*$//
82s/[:]* *EQU .*$//
83s/$/ /
84/^\.[[:alnum:]_.]* *$/!t error
85G
86s/^\([^ ]*\) \(.*\)$/global \2\1 ; member2/
87s/\n//m
88
89b end
90
91#
92# Alias member like Host.cr0Fpu in 64-bit. Drop it.
93#
94:member_alias
95d
96b end
97
98:error
99s/^/\nSed script logic error!\nBuffer: /
100s/$/\nHold: /
101G
102q 1
103b end
104
105
106:end
107
注意: 瀏覽 TracBrowser 來幫助您使用儲存庫瀏覽器

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