aboutsummaryrefslogtreecommitdiff
path: root/vl.h
diff options
context:
space:
mode:
authorbellard <bellard@c046a42c-6fe2-441c-8c8c-71466251a162>2004-04-25 22:08:49 +0000
committerbellard <bellard@c046a42c-6fe2-441c-8c8c-71466251a162>2004-04-25 22:08:49 +0000
commit165c6fc8ce3026eeeef2e8a1235b0bd08b51f03e (patch)
tree75631951d7441ef1ceeb70641edd125eba598f6d /vl.h
parent2e12669a4c06c7d26351b0c250db9b1ad72ba76f (diff)
more endianness macros
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@759 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'vl.h')
-rw-r--r--vl.h41
1 files changed, 41 insertions, 0 deletions
diff --git a/vl.h b/vl.h
index 59ac6935b6..e47f7020b2 100644
--- a/vl.h
+++ b/vl.h
@@ -67,6 +67,16 @@ static inline uint16_t be16_to_cpu(uint16_t v)
return v;
}
+static inline uint32_t cpu_to_be32(uint32_t v)
+{
+ return v;
+}
+
+static inline uint16_t cpu_to_be16(uint16_t v)
+{
+ return v;
+}
+
static inline uint32_t le32_to_cpu(uint32_t v)
{
return bswap32(v);
@@ -77,7 +87,18 @@ static inline uint16_t le16_to_cpu(uint16_t v)
return bswap16(v);
}
+static inline uint32_t cpu_to_le32(uint32_t v)
+{
+ return bswap32(v);
+}
+
+static inline uint16_t cpu_to_le16(uint16_t v)
+{
+ return bswap16(v);
+}
+
#else
+
static inline uint32_t be32_to_cpu(uint32_t v)
{
return bswap32(v);
@@ -88,6 +109,16 @@ static inline uint16_t be16_to_cpu(uint16_t v)
return bswap16(v);
}
+static inline uint32_t cpu_to_be32(uint32_t v)
+{
+ return bswap32(v);
+}
+
+static inline uint16_t cpu_to_be16(uint16_t v)
+{
+ return bswap16(v);
+}
+
static inline uint32_t le32_to_cpu(uint32_t v)
{
return v;
@@ -97,6 +128,16 @@ static inline uint16_t le16_to_cpu(uint16_t v)
{
return v;
}
+
+static inline uint32_t cpu_to_le32(uint32_t v)
+{
+ return v;
+}
+
+static inline uint16_t cpu_to_le16(uint16_t v)
+{
+ return v;
+}
#endif