Add 128 bit transfers to sim core.
This commit is contained in:
parent
635ae9cb7c
commit
f45dd42b32
7 changed files with 180 additions and 66 deletions
|
@ -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_ */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue