aboutsummaryrefslogtreecommitdiff
path: root/libgcc
diff options
context:
space:
mode:
authorYufeng Zhang <yufeng.zhang@arm.com>2013-01-17 14:27:36 +0000
committerYufeng Zhang <yufeng@gcc.gnu.org>2013-01-17 14:27:36 +0000
commit922c57d1ba5cb53ba29bc303ab66e869065d540b (patch)
treef129a6ce4913ae778276244dc933a383a232aa46 /libgcc
parent8222c37ededfe0f55233898ecc7c4cc023f6389c (diff)
downloadgcc-922c57d1ba5cb53ba29bc303ab66e869065d540b.zip
gcc-922c57d1ba5cb53ba29bc303ab66e869065d540b.tar.gz
gcc-922c57d1ba5cb53ba29bc303ab66e869065d540b.tar.bz2
sync-cache.c (__aarch64_sync_cache_range): Cast the results of (dcache_lsize - 1) and (icache_lsize - 1) to the type...
2013-01-17 Yufeng Zhang <yufeng.zhang@arm.com> * config/aarch64/sync-cache.c (__aarch64_sync_cache_range): Cast the results of (dcache_lsize - 1) and (icache_lsize - 1) to the type __UINTPTR_TYPE__; also cast 'base' to the same type before the alignment operation. From-SVN: r195266
Diffstat (limited to 'libgcc')
-rw-r--r--libgcc/ChangeLog7
-rw-r--r--libgcc/config/aarch64/sync-cache.c6
2 files changed, 11 insertions, 2 deletions
diff --git a/libgcc/ChangeLog b/libgcc/ChangeLog
index 7750449..d47f64e 100644
--- a/libgcc/ChangeLog
+++ b/libgcc/ChangeLog
@@ -1,3 +1,10 @@
+2013-01-17 Yufeng Zhang <yufeng.zhang@arm.com>
+
+ * config/aarch64/sync-cache.c (__aarch64_sync_cache_range): Cast the
+ results of (dcache_lsize - 1) and (icache_lsize - 1) to the type
+ __UINTPTR_TYPE__; also cast 'base' to the same type before the
+ alignment operation.
+
2013-01-15 Sofiane Naci <sofiane.naci@arm.com>
* config/aarch64/sync-cache.c (__aarch64_sync_cache_range): Update
diff --git a/libgcc/config/aarch64/sync-cache.c b/libgcc/config/aarch64/sync-cache.c
index 2512cb8..66b7afe 100644
--- a/libgcc/config/aarch64/sync-cache.c
+++ b/libgcc/config/aarch64/sync-cache.c
@@ -40,7 +40,8 @@ __aarch64_sync_cache_range (const void *base, const void *end)
as per the GNU definition of __clear_cache. */
/* Make the start address of the loop cache aligned. */
- address = (const char*) ((unsigned long) base & ~ (dcache_lsize - 1));
+ address = (const char*) ((__UINTPTR_TYPE__) base
+ & ~ (__UINTPTR_TYPE__) (dcache_lsize - 1));
for (address; address < (const char *) end; address += dcache_lsize)
asm volatile ("dc\tcvau, %0"
@@ -51,7 +52,8 @@ __aarch64_sync_cache_range (const void *base, const void *end)
asm volatile ("dsb\tish" : : : "memory");
/* Make the start address of the loop cache aligned. */
- address = (const char*) ((unsigned long) base & ~ (icache_lsize - 1));
+ address = (const char*) ((__UINTPTR_TYPE__) base
+ & ~ (__UINTPTR_TYPE__) (icache_lsize - 1));
for (address; address < (const char *) end; address += icache_lsize)
asm volatile ("ic\tivau, %0"