aboutsummaryrefslogtreecommitdiff
path: root/gdb/testsuite/gdb.trace/entry-values.exp
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/testsuite/gdb.trace/entry-values.exp')
-rw-r--r--gdb/testsuite/gdb.trace/entry-values.exp14
1 files changed, 14 insertions, 0 deletions
diff --git a/gdb/testsuite/gdb.trace/entry-values.exp b/gdb/testsuite/gdb.trace/entry-values.exp
index e812241..2548e89 100644
--- a/gdb/testsuite/gdb.trace/entry-values.exp
+++ b/gdb/testsuite/gdb.trace/entry-values.exp
@@ -43,6 +43,20 @@ if { [istarget "arm*-*-*"] || [istarget "aarch64*-*-*"] } {
set call_insn "brasl"
} elseif { [istarget "powerpc*-*-*"] } {
set call_insn "bl"
+} elseif { [istarget "mips*-*-*"] } {
+ # Skip the delay slot after the instruction used to make a call
+ # (which can be a jump or a branch) if it has one.
+ #
+ # JUMP (or BRANCH) foo
+ # insn1
+ # insn2
+ #
+ # Most MIPS instructions used to make calls have a delay slot.
+ # These include JAL, JALS, JALX, JALR, JALRS, BAL and BALS.
+ # In this case the program continues from `insn2' when `foo'
+ # returns. The only exception is JALRC, in which case execution
+ # resumes from `insn1' instead.
+ set call_insn {jalrc|[jb]al[sxr]*[ \t][^\r\n]+\r\n}
} else {
set call_insn "call"
}