#include "sim-xcat.h"
-#ifdef __STDC__
+#if defined(__STDC__) && defined(signed)
/* If signed were defined to be say __signed (ie, some versions of Linux),
then the signedN macro would not work correctly. If we have a standard
compiler, we have signed. */
#define ROTRn XCONCAT2(ROTR,N)
#define SEXTn XCONCAT2(SEXT,N)
+/* TAGS: MASKED16 MASKED32 MASKED64 */
INLINE_SIM_BITS\
(unsignedN)
return (word & MASKn (start, stop));
}
+/* TAGS: LSMASKED16 LSMASKED32 LSMASKED64 */
INLINE_SIM_BITS\
(unsignedN)
return (word & LSMASKn (nr_bits));
}
+/* TAGS: MSMASKED16 MSMASKED32 MSMASKED64 */
INLINE_SIM_BITS\
(unsignedN)
return (word & MSMASKn (nr_bits));
}
+/* TAGS: EXTRACTED16 EXTRACTED32 EXTRACTED64 */
INLINE_SIM_BITS\
(unsignedN)
return val;
}
+/* TAGS: INSERTED16 INSERTED32 INSERTED64 */
INLINE_SIM_BITS\
(unsignedN)
return val;
}
+/* TAGS: ROT16 ROT32 ROT64 */
INLINE_SIM_BITS\
(unsignedN)
return val;
}
+/* TAGS: ROTL16 ROTL32 ROTL64 */
INLINE_SIM_BITS\
(unsignedN)
return result;
}
+/* TAGS: ROTR16 ROTR32 ROTR64 */
INLINE_SIM_BITS\
(unsignedN)
return result;
}
+/* TAGS: SEXT16 SEXT32 SEXT64 */
INLINE_SIM_BITS\
(unsignedN)