Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
K
kvm-unit-tests-ae
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
linux-arm
kvm-unit-tests-ae
Commits
c0b7268d
Commit
c0b7268d
authored
15 years ago
by
Avi Kivity
Browse files
Options
Downloads
Patches
Plain Diff
Test CALL FAR R/M instrucion (opcode FF /3)
Signed-off-by:
Avi Kivity
<
avi@redhat.com
>
parent
0cbd5b06
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
x86/realmode.c
+14
-0
14 additions, 0 deletions
x86/realmode.c
with
14 additions
and
0 deletions
x86/realmode.c
+
14
−
0
View file @
c0b7268d
...
...
@@ -604,10 +604,14 @@ void test_io(void)
print_serial
(
"I/O test 6: PASS
\n
"
);
}
asm
(
"retf: lretw"
);
extern
void
retf
();
void
test_call
(
void
)
{
struct
regs
inregs
=
{
0
},
outregs
;
u32
esp
[
16
];
u32
addr
;
inregs
.
esp
=
(
u32
)
esp
;
...
...
@@ -622,6 +626,7 @@ void test_call(void)
"1: mov $0x1234, %eax
\n\t
"
"ret
\n\t
"
"2:
\t
"
);
MK_INSN
(
call_far1
,
"lcallw *(%ebx)
\n\t
"
);
exec_in_big_real_mode
(
&
inregs
,
&
outregs
,
insn_call1
,
...
...
@@ -644,6 +649,15 @@ void test_call(void)
print_serial
(
"Call near Test 2: FAIL
\n
"
);
else
print_serial
(
"Call near Test 2: PASS
\n
"
);
addr
=
(((
unsigned
)
retf
>>
4
)
<<
16
)
|
((
unsigned
)
retf
&
0x0f
);
inregs
.
ebx
=
(
unsigned
)
&
addr
;
exec_in_big_real_mode
(
&
inregs
,
&
outregs
,
insn_call_far1
,
insn_call_far1_end
-
insn_call_far1
);
if
(
!
regs_equal
(
&
inregs
,
&
outregs
,
0
))
print_serial
(
"Call far Test 1: FAIL
\n
"
);
else
print_serial
(
"Call far Test 1: PASS
\n
"
);
}
void
test_jcc_short
(
void
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment