VirtualBox

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

Last change on this file since 91775 was 91287, checked in by vboxsync, 3 years ago

VMM/CPUM,++: Moved the nested SVM VMCB allocation into CPUMCTX. bugref:10093

  • Property svn:eol-style set to LF
  • Property svn:keywords set to Id
File size: 1.9 KB
Line 
1# $Id: tstAsmStructsAsm-lst.sed 91287 2021-09-16 21:30:45Z 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.virtualbox.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
33/ *\.unnamed_padding\./d
34s/[[:space:]][[:space:]]*/ /g
35
36#
37# Figure which type of line this is and process it accordingly.
38#
39/^[[:alpha:]_][[:alnum:]_]*:/b struct
40/^[[:alpha:]_][[:alnum:]_]*_size EQU \$ - .*$/b struct_equ
41/<gap>/b member
42/^\.[[:alpha:]_][[:alnum:]_.:]* res.*$/b member_two
43/^\.[[:alpha:]_][[:alnum:]_.:]* EQU .*$/b member_two
44/^\.[[:alpha:]_][[:alnum:]_.:]*:$/b member_alias
45b error
46b member_two
47
48
49#
50# Struct start / end.
51#
52:struct_equ
53s/_size EQU.*$/_size/
54:struct
55s/:$//
56h
57s/^/global /
58s/$/ ; struct/
59b end
60
61
62#
63# Struct member
64# Note: the 't' command doesn't seem to be working right with 's'.
65#
66:member
67s/[[:xdigit:]]* *//
68s/<gap> *//
69/^\.[[:alnum:]_.]*[:]* .*$/!t error
70s/\(\.[[:alnum:]_]*\)[:]* .*$/\1 /
71G
72s/^\([^ ]*\) \(.*\)$/global \2\1 ; member/
73s/\n//m
74
75b end
76
77
78#
79# Struct member, no address. yasm r1842 and later.
80#
81:member_two
82s/[:]* *res[bwdtq] .*$//
83s/[:]* *EQU .*$//
84s/$/ /
85/^\.[[:alnum:]_.]* *$/!t error
86G
87s/^\([^ ]*\) \(.*\)$/global \2\1 ; member2/
88s/\n//m
89
90b end
91
92#
93# Alias member like Host.cr0Fpu in 64-bit. Drop it.
94#
95:member_alias
96d
97b end
98
99:error
100s/^/\nSed script logic error!\nBuffer: /
101s/$/\nHold: /
102G
103q 1
104b end
105
106
107:end
108
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