diff options
author | Gabe Black <gblack@eecs.umich.edu> | 2010-08-25 19:10:42 -0500 |
---|---|---|
committer | Gabe Black <gblack@eecs.umich.edu> | 2010-08-25 19:10:42 -0500 |
commit | 0efe2f676972b0aeb7e8e7b756a367f36293b091 (patch) | |
tree | 09e0bb82a99a8e34aff3278e4e9f52f258541216 /src/arch/arm/isa/templates | |
parent | 54a919f22587c75be5e7f0b88d5ec13baba600aa (diff) | |
download | gem5-0efe2f676972b0aeb7e8e7b756a367f36293b091.tar.xz |
ARM: Fix type comparison warnings in Neon.
Diffstat (limited to 'src/arch/arm/isa/templates')
-rw-r--r-- | src/arch/arm/isa/templates/neon.isa | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/src/arch/arm/isa/templates/neon.isa b/src/arch/arm/isa/templates/neon.isa index e402979dc..20c1d26b8 100644 --- a/src/arch/arm/isa/templates/neon.isa +++ b/src/arch/arm/isa/templates/neon.isa @@ -142,6 +142,32 @@ def template NeonExecDeclare {{ %(CPU_exec_context)s *, Trace::InstRecord *) const; }}; +output header {{ + template <class T> + // Implement a less-than-zero function: ltz() + // this function exists because some versions of GCC complain when a + // comparison is done between a unsigned variable and 0 and for GCC 4.2 + // there is no way to disable this warning + inline bool ltz(T t); + + template <> + inline bool ltz(uint8_t) { return false; } + template <> + inline bool ltz(uint16_t) { return false; } + template <> + inline bool ltz(uint32_t) { return false; } + template <> + inline bool ltz(uint64_t) { return false; } + template <> + inline bool ltz(int8_t v) { return v < 0; } + template <> + inline bool ltz(int16_t v) { return v < 0; } + template <> + inline bool ltz(int32_t v) { return v < 0; } + template <> + inline bool ltz(int64_t v) { return v < 0; } +}}; + def template NeonEqualRegExecute {{ template <class Element> Fault %(class_name)s<Element>::execute(%(CPU_exec_context)s *xc, |