summaryrefslogtreecommitdiff
path: root/lib_ppc/extable.c
diff options
context:
space:
mode:
authorHaavard Skinnemoen <hskinnemoen@atmel.com>2007-06-19 15:40:01 +0200
committerHaavard Skinnemoen <hskinnemoen@atmel.com>2007-06-19 15:40:01 +0200
commit448f5fea4c7dd531b69e4e60eed2a72b89b4ed6d (patch)
tree022599b68a0e72f34f3f152f4a0056b557a06a44 /lib_ppc/extable.c
parentf2134f8e9eb006bdcd729e89f309c07b2fa45180 (diff)
parent5ffa76a032279bc6d3230b703eda32d13305ba13 (diff)
downloadu-boot-imx-448f5fea4c7dd531b69e4e60eed2a72b89b4ed6d.zip
u-boot-imx-448f5fea4c7dd531b69e4e60eed2a72b89b4ed6d.tar.gz
u-boot-imx-448f5fea4c7dd531b69e4e60eed2a72b89b4ed6d.tar.bz2
Merge branch 'upstream'
Diffstat (limited to 'lib_ppc/extable.c')
-rw-r--r--lib_ppc/extable.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/lib_ppc/extable.c b/lib_ppc/extable.c
index fe856ff..b14d661 100644
--- a/lib_ppc/extable.c
+++ b/lib_ppc/extable.c
@@ -57,25 +57,25 @@ search_one_table(const struct exception_table_entry *first,
long diff;
mid = (last - first) / 2 + first;
- if (mid > CFG_MONITOR_BASE) {
- /* exception occurs in FLASH, before u-boot relocation.
- * No relocation offset is needed.
- */
+ if ((ulong) mid > CFG_MONITOR_BASE) {
+ /* exception occurs in FLASH, before u-boot relocation.
+ * No relocation offset is needed.
+ */
diff = mid->insn - value;
if (diff == 0)
return mid->fixup;
} else {
- /* exception occurs in RAM, after u-boot relocation.
- * A relocation offset should be added.
- */
+ /* exception occurs in RAM, after u-boot relocation.
+ * A relocation offset should be added.
+ */
diff = (mid->insn + gd->reloc_off) - value;
if (diff == 0)
return (mid->fixup + gd->reloc_off);
}
if (diff < 0)
- first = mid+1;
+ first = mid + 1;
else
- last = mid-1;
+ last = mid - 1;
}
return 0;
}