1 /* 2 * Copyright (C) 1995 Advanced RISC Machines Limited. All rights reserved. 3 * 4 * This software may be freely used, copied, modified, and distributed 5 * provided that the above copyright notice is preserved in all copies of the 6 * software. 7 */ 8 9 /* 10 Title: Code to support byte-sex independence 11 Copyright: (C) 1991, Advanced RISC Machines Ltd., Cambridge, England. 12 */ 13 /* 14 * RCS $Revision: 1.3 $ 15 * Checkin $Date: 2004/12/27 14:00:53 $ 16 */ 17 18 #ifndef angel_bytesex_h 19 #define angel_bytesex_h 20 21 #include "host.h" 22 23 void bytesex_reverse(int yes_or_no); 24 /* 25 * Turn sex-reversal on or off - 0 means off, non-0 means on. 26 */ 27 28 int bytesex_reversing(void); 29 /* 30 * Return non-0 if reversing the byte sex, else 0. 31 */ 32 33 int32 bytesex_hostval(int32 v); 34 /* 35 * Return v or byte-reversed v, according to whether sex-reversval 36 * is on or off. 37 */ 38 39 int32 bytesex_hostval_16(int32 v); 40 /* Return v or byte-reversed v for a 16 bit value */ 41 42 #endif 43