diff options
author | Michael Meissner <gnu@the-meissners.org> | 1995-03-02 21:51:30 +0000 |
---|---|---|
committer | Michael Meissner <gnu@the-meissners.org> | 1995-03-02 21:51:30 +0000 |
commit | dc59e9828683ce04aa921cc9e7ee5f333c4c4fe3 (patch) | |
tree | 9e786eaf0b9797c70c3845a13c2e87675c6948f2 /gdb | |
parent | 773033d2d2369f6a73ffd8dadd36ce687bfdb890 (diff) | |
download | gdb-dc59e9828683ce04aa921cc9e7ee5f333c4c4fe3.zip gdb-dc59e9828683ce04aa921cc9e7ee5f333c4c4fe3.tar.gz gdb-dc59e9828683ce04aa921cc9e7ee5f333c4c4fe3.tar.bz2 |
Minor code cleanup in rs6000-tdep.c
Diffstat (limited to 'gdb')
-rw-r--r-- | gdb/ChangeLog | 5 | ||||
-rw-r--r-- | gdb/rs6000-tdep.c | 8 |
2 files changed, 11 insertions, 2 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 8e1a4f2..547d49c 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,8 @@ +Thu Mar 2 16:48:45 1995 Michael Meissner <meissner@cygnus.com> + + * rs6000-tdep.c (branch_dest): Minor code cleanup, don't share + code between branch unconditional and branch conditional cases. + Wed Mar 1 09:41:26 1995 Doug Evans <dje@canuck.cygnus.com> Various changes for sparc64. diff --git a/gdb/rs6000-tdep.c b/gdb/rs6000-tdep.c index f08c77d..e226f54 100644 --- a/gdb/rs6000-tdep.c +++ b/gdb/rs6000-tdep.c @@ -78,10 +78,14 @@ branch_dest (opcode, instr, pc, safety) switch (opcode) { case 18 : immediate = ((instr & ~3) << 6) >> 6; /* br unconditional */ + if (absolute) + dest = immediate; + else + dest = pc + immediate; + break; case 16 : - if (opcode != 18) /* br conditional */ - immediate = ((instr & ~3) << 16) >> 16; + immediate = ((instr & ~3) << 16) >> 16; /* br conditional */ if (absolute) dest = immediate; else |