mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-05 16:53:55 -06:00
trivial patches for 2014-05-26
-----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.12 (GNU/Linux) iQEcBAABAgAGBQJTgup0AAoJEL7lnXSkw9fb2z0IAJVnjV1b2xGqWrbBFPvm1zdT 8vSKdW77kvtL1Usx2xLLqjn+xfJsmDwiIfEZvAEsma2s8ubVkz9hiQylq9jdSxGi YR0i8xUeqeF6n2RttzEw9rENHa9qZllxGpBQyIcjxo+7hcgVkj0r15x+JAIkeIpV 6iCx1mqAC5QJbHrIN1eO5ymDZvsq37Q8S9jRU0hJ18MwFfKc1z9T38D+VytnW9xK l5Qg3JEf9HBI9zTChfRDImTDXNV2Ehm0nK5/8noD0mjp06p/DF/HN+BDsXM/0cPc aWmoVNa0KGCqXvmI+F/7RWBzxaOkH9UXDrf1ed10Io6Nsp0nGfxWJHEA9to/fyo= =86oR -----END PGP SIGNATURE----- Merge remote-tracking branch 'remotes/mjt/tags/trivial-patches-2014-05-26' into staging trivial patches for 2014-05-26 # gpg: Signature made Mon 26 May 2014 08:17:08 BST using RSA key ID A4C3D7DB # gpg: Can't check signature: public key not found * remotes/mjt/tags/trivial-patches-2014-05-26: (23 commits) libcacard: remove useless initializers net: cadence_gem: Fix top comment bsd-user: replace fprintf(stderr, ...) with error_report() audio: replace fprintf(stderr, ...) with error_report() in audio libcacard: fix wrong array expansion logic libcacard/vcard_emul_nss: Drop a redundant conditional libcacard: Convert two leftover realloc() to GLib libcacard/vreader: Tighten assertion to clarify intent libcacard/vreader: Drop broken recovery from failed assertion libcacard: Plug memory leaks around vreader_get_reader_list() libcacard/vscclient: Bury some dead code vl: fix 'name' option to work with -readconfig configure: Put tempfiles in a subdir of the build directory dma-helpers: avoid calling dma_bdrv_unmap() twice arch_init: replace fprintf(stderr, ...) with error_report() pci: move dereferencing of root only after verifying valid root pointer jazz_led: Add missing break in switch case bswap.h: Rename ldl_p, stl_p, etc to ldl_he_p, stl_he_p, etc configure: Automatically select GTK+ 3.0 if GTK+ 2.0 is unavailable nbd: Miscellaneous typo fixes. ... Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
This commit is contained in:
commit
9474ab1487
26 changed files with 167 additions and 181 deletions
|
@ -215,9 +215,10 @@ typedef union {
|
|||
* q: 64 bits
|
||||
*
|
||||
* endian is:
|
||||
* (empty): host endian
|
||||
* he : host endian
|
||||
* be : big endian
|
||||
* le : little endian
|
||||
* (except for byte accesses, which have no endian infix).
|
||||
*/
|
||||
|
||||
static inline int ldub_p(const void *ptr)
|
||||
|
@ -239,82 +240,82 @@ static inline void stb_p(void *ptr, uint8_t v)
|
|||
operations. Thus we don't need to play games with packed attributes, or
|
||||
inline byte-by-byte stores. */
|
||||
|
||||
static inline int lduw_p(const void *ptr)
|
||||
static inline int lduw_he_p(const void *ptr)
|
||||
{
|
||||
uint16_t r;
|
||||
memcpy(&r, ptr, sizeof(r));
|
||||
return r;
|
||||
}
|
||||
|
||||
static inline int ldsw_p(const void *ptr)
|
||||
static inline int ldsw_he_p(const void *ptr)
|
||||
{
|
||||
int16_t r;
|
||||
memcpy(&r, ptr, sizeof(r));
|
||||
return r;
|
||||
}
|
||||
|
||||
static inline void stw_p(void *ptr, uint16_t v)
|
||||
static inline void stw_he_p(void *ptr, uint16_t v)
|
||||
{
|
||||
memcpy(ptr, &v, sizeof(v));
|
||||
}
|
||||
|
||||
static inline int ldl_p(const void *ptr)
|
||||
static inline int ldl_he_p(const void *ptr)
|
||||
{
|
||||
int32_t r;
|
||||
memcpy(&r, ptr, sizeof(r));
|
||||
return r;
|
||||
}
|
||||
|
||||
static inline void stl_p(void *ptr, uint32_t v)
|
||||
static inline void stl_he_p(void *ptr, uint32_t v)
|
||||
{
|
||||
memcpy(ptr, &v, sizeof(v));
|
||||
}
|
||||
|
||||
static inline uint64_t ldq_p(const void *ptr)
|
||||
static inline uint64_t ldq_he_p(const void *ptr)
|
||||
{
|
||||
uint64_t r;
|
||||
memcpy(&r, ptr, sizeof(r));
|
||||
return r;
|
||||
}
|
||||
|
||||
static inline void stq_p(void *ptr, uint64_t v)
|
||||
static inline void stq_he_p(void *ptr, uint64_t v)
|
||||
{
|
||||
memcpy(ptr, &v, sizeof(v));
|
||||
}
|
||||
|
||||
static inline int lduw_le_p(const void *ptr)
|
||||
{
|
||||
return (uint16_t)le_bswap(lduw_p(ptr), 16);
|
||||
return (uint16_t)le_bswap(lduw_he_p(ptr), 16);
|
||||
}
|
||||
|
||||
static inline int ldsw_le_p(const void *ptr)
|
||||
{
|
||||
return (int16_t)le_bswap(lduw_p(ptr), 16);
|
||||
return (int16_t)le_bswap(lduw_he_p(ptr), 16);
|
||||
}
|
||||
|
||||
static inline int ldl_le_p(const void *ptr)
|
||||
{
|
||||
return le_bswap(ldl_p(ptr), 32);
|
||||
return le_bswap(ldl_he_p(ptr), 32);
|
||||
}
|
||||
|
||||
static inline uint64_t ldq_le_p(const void *ptr)
|
||||
{
|
||||
return le_bswap(ldq_p(ptr), 64);
|
||||
return le_bswap(ldq_he_p(ptr), 64);
|
||||
}
|
||||
|
||||
static inline void stw_le_p(void *ptr, uint16_t v)
|
||||
{
|
||||
stw_p(ptr, le_bswap(v, 16));
|
||||
stw_he_p(ptr, le_bswap(v, 16));
|
||||
}
|
||||
|
||||
static inline void stl_le_p(void *ptr, uint32_t v)
|
||||
{
|
||||
stl_p(ptr, le_bswap(v, 32));
|
||||
stl_he_p(ptr, le_bswap(v, 32));
|
||||
}
|
||||
|
||||
static inline void stq_le_p(void *ptr, uint64_t v)
|
||||
{
|
||||
stq_p(ptr, le_bswap(v, 64));
|
||||
stq_he_p(ptr, le_bswap(v, 64));
|
||||
}
|
||||
|
||||
/* float access */
|
||||
|
@ -349,37 +350,37 @@ static inline void stfq_le_p(void *ptr, float64 v)
|
|||
|
||||
static inline int lduw_be_p(const void *ptr)
|
||||
{
|
||||
return (uint16_t)be_bswap(lduw_p(ptr), 16);
|
||||
return (uint16_t)be_bswap(lduw_he_p(ptr), 16);
|
||||
}
|
||||
|
||||
static inline int ldsw_be_p(const void *ptr)
|
||||
{
|
||||
return (int16_t)be_bswap(lduw_p(ptr), 16);
|
||||
return (int16_t)be_bswap(lduw_he_p(ptr), 16);
|
||||
}
|
||||
|
||||
static inline int ldl_be_p(const void *ptr)
|
||||
{
|
||||
return be_bswap(ldl_p(ptr), 32);
|
||||
return be_bswap(ldl_he_p(ptr), 32);
|
||||
}
|
||||
|
||||
static inline uint64_t ldq_be_p(const void *ptr)
|
||||
{
|
||||
return be_bswap(ldq_p(ptr), 64);
|
||||
return be_bswap(ldq_he_p(ptr), 64);
|
||||
}
|
||||
|
||||
static inline void stw_be_p(void *ptr, uint16_t v)
|
||||
{
|
||||
stw_p(ptr, be_bswap(v, 16));
|
||||
stw_he_p(ptr, be_bswap(v, 16));
|
||||
}
|
||||
|
||||
static inline void stl_be_p(void *ptr, uint32_t v)
|
||||
{
|
||||
stl_p(ptr, be_bswap(v, 32));
|
||||
stl_he_p(ptr, be_bswap(v, 32));
|
||||
}
|
||||
|
||||
static inline void stq_be_p(void *ptr, uint64_t v)
|
||||
{
|
||||
stq_p(ptr, be_bswap(v, 64));
|
||||
stq_he_p(ptr, be_bswap(v, 64));
|
||||
}
|
||||
|
||||
/* float access */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue