summaryrefslogtreecommitdiff
path: root/src/arch/x86/isa/insts/general_purpose/control_transfer/call.py
diff options
context:
space:
mode:
authorNilay Vaish <nilay@cs.wisc.edu>2013-05-21 11:34:41 -0500
committerNilay Vaish <nilay@cs.wisc.edu>2013-05-21 11:34:41 -0500
commit30fe807316ebc4b6c37ca522b3cfd6c592ca9003 (patch)
tree12f5e529771617cf5c1ce93ea0200a5cf4a4a45e /src/arch/x86/isa/insts/general_purpose/control_transfer/call.py
parentfba40864aab3015009efe4ade7599c07bc28ab1a (diff)
downloadgem5-30fe807316ebc4b6c37ca522b3cfd6c592ca9003.tar.xz
x86: mark instructions for being function call/return
Currently call and return instructions are marked as IsCall and IsReturn. Thus, the branch predictor does not use RAS for these instructions. Similarly, the number of function calls that took place is recorded as 0. This patch marks these instructions as they should be.
Diffstat (limited to 'src/arch/x86/isa/insts/general_purpose/control_transfer/call.py')
-rw-r--r--src/arch/x86/isa/insts/general_purpose/control_transfer/call.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/arch/x86/isa/insts/general_purpose/control_transfer/call.py b/src/arch/x86/isa/insts/general_purpose/control_transfer/call.py
index f18a062a6..eaaa18208 100644
--- a/src/arch/x86/isa/insts/general_purpose/control_transfer/call.py
+++ b/src/arch/x86/isa/insts/general_purpose/control_transfer/call.py
@@ -40,6 +40,7 @@ def macroop CALL_NEAR_I
{
# Make the default data size of calls 64 bits in 64 bit mode
.adjust_env oszIn64Override
+ .function_call
limm t1, imm
rdip t7
@@ -53,6 +54,7 @@ def macroop CALL_NEAR_R
{
# Make the default data size of calls 64 bits in 64 bit mode
.adjust_env oszIn64Override
+ .function_call
rdip t1
# Check target of call
@@ -65,6 +67,7 @@ def macroop CALL_NEAR_M
{
# Make the default data size of calls 64 bits in 64 bit mode
.adjust_env oszIn64Override
+ .function_call
rdip t7
ld t1, seg, sib, disp
@@ -78,6 +81,7 @@ def macroop CALL_NEAR_P
{
# Make the default data size of calls 64 bits in 64 bit mode
.adjust_env oszIn64Override
+ .function_call
rdip t7
ld t1, seg, riprel, disp