diff options
author | Andrew Cagney <cagney@redhat.com> | 1997-10-27 03:00:12 +0000 |
---|---|---|
committer | Andrew Cagney <cagney@redhat.com> | 1997-10-27 03:00:12 +0000 |
commit | f45dd42b32b0ea4b3eb27c180e64805b9fb548c6 (patch) | |
tree | 21067f5a15e99f60df1c8ea825550f5b1712e3cd /sim/common/sim-endian.c | |
parent | 635ae9cb7cd6337401ab81144b31f6bc33e20b10 (diff) | |
download | binutils-f45dd42b32b0ea4b3eb27c180e64805b9fb548c6.zip binutils-f45dd42b32b0ea4b3eb27c180e64805b9fb548c6.tar.gz binutils-f45dd42b32b0ea4b3eb27c180e64805b9fb548c6.tar.bz2 |
Add 128 bit transfers to sim core.
Diffstat (limited to 'sim/common/sim-endian.c')
-rw-r--r-- | sim/common/sim-endian.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/sim/common/sim-endian.c b/sim/common/sim-endian.c index 3a32986..24dc7c5 100644 --- a/sim/common/sim-endian.c +++ b/sim/common/sim-endian.c @@ -23,6 +23,8 @@ #define _SIM_ENDIAN_C_ #include "sim-basics.h" +#include "sim-assert.h" +#include "sim-io.h" #if !defined(_SWAP_1) @@ -54,6 +56,17 @@ SET out.dword; #endif +#ifndef _SWAP_16 +#define _SWAP_16(SET,RAW) \ + union { unsigned_16 word; unsigned_4 words[4]; } in, out; \ + in.word = (RAW); \ + _SWAP_4 (out.words[0] =, in.words[3]); \ + _SWAP_4 (out.words[1] =, in.words[2]); \ + _SWAP_4 (out.words[2] =, in.words[1]); \ + _SWAP_4 (out.words[3] =, in.words[0]); \ + SET out.word; +#endif + #define N 1 #include "sim-n-endian.h" @@ -71,4 +84,8 @@ #include "sim-n-endian.h" #undef N +#define N 16 +#include "sim-n-endian.h" +#undef N + #endif /* _SIM_ENDIAN_C_ */ |