packet.hh (12966:3b20a7f755d5) | packet.hh (13228:c7257ea8d84a) |
---|---|
1/* 2 * Copyright (c) 2012-2018 ARM Limited 3 * All rights reserved 4 * 5 * The license below extends only to copyright in the software and shall 6 * not be construed as granting a license to any other intellectual 7 * property including but not limited to intellectual property relating 8 * to a hardware implementation of the functionality of the software --- 1063 unchanged lines hidden (view full) --- 1072 1073 /** 1074 * Set the value in the data pointer to v using the specified 1075 * endianness. 1076 */ 1077 template <typename T> 1078 void set(T v, ByteOrder endian); 1079 | 1/* 2 * Copyright (c) 2012-2018 ARM Limited 3 * All rights reserved 4 * 5 * The license below extends only to copyright in the software and shall 6 * not be construed as granting a license to any other intellectual 7 * property including but not limited to intellectual property relating 8 * to a hardware implementation of the functionality of the software --- 1063 unchanged lines hidden (view full) --- 1072 1073 /** 1074 * Set the value in the data pointer to v using the specified 1075 * endianness. 1076 */ 1077 template <typename T> 1078 void set(T v, ByteOrder endian); 1079 |
1080#if THE_ISA != NULL_ISA |
|
1080 /** Set the value in the data pointer to v as guest endian. */ 1081 template <typename T> 1082 void set(T v); | 1081 /** Set the value in the data pointer to v as guest endian. */ 1082 template <typename T> 1083 void set(T v); |
1084#endif |
|
1083 1084 1085 /** 1086 * Get the data in the packet byte swapped from the specified 1087 * endianness and zero-extended to 64 bits. 1088 */ 1089 uint64_t getUintX(ByteOrder endian) const; 1090 --- 77 unchanged lines hidden (view full) --- 1168 assert(flags.noneSet(STATIC_DATA|DYNAMIC_DATA)); 1169 flags.set(DYNAMIC_DATA); 1170 data = new uint8_t[getSize()]; 1171 } 1172 } 1173 1174 /** @} */ 1175 | 1085 1086 1087 /** 1088 * Get the data in the packet byte swapped from the specified 1089 * endianness and zero-extended to 64 bits. 1090 */ 1091 uint64_t getUintX(ByteOrder endian) const; 1092 --- 77 unchanged lines hidden (view full) --- 1170 assert(flags.noneSet(STATIC_DATA|DYNAMIC_DATA)); 1171 flags.set(DYNAMIC_DATA); 1172 data = new uint8_t[getSize()]; 1173 } 1174 } 1175 1176 /** @} */ 1177 |
1176 private: // Private data accessor methods | |
1177 /** Get the data in the packet without byte swapping. */ 1178 template <typename T> 1179 T getRaw() const; 1180 1181 /** Set the value in the data pointer to v without byte swapping. */ 1182 template <typename T> 1183 void setRaw(T v); 1184 --- 85 unchanged lines hidden --- | 1178 /** Get the data in the packet without byte swapping. */ 1179 template <typename T> 1180 T getRaw() const; 1181 1182 /** Set the value in the data pointer to v without byte swapping. */ 1183 template <typename T> 1184 void setRaw(T v); 1185 --- 85 unchanged lines hidden --- |