Annotation of previous/src/cpu/maccess.h, revision 1.1.1.2

1.1       root        1:  /*
                      2:   * UAE - The Un*x Amiga Emulator - CPU core
                      3:   *
                      4:   * Big endian memory access functions.
                      5:   *
                      6:   * Copyright 1996 Bernd Schmidt
                      7:   *
                      8:   * Adaptation to Hatari by Thomas Huth, Eero Tamminen
                      9:   *
                     10:   * This file is distributed under the GNU Public License, version 2 or at
                     11:   * your option any later version. Read the file gpl.txt for details.
                     12:   */
                     13: 
                     14: #ifndef UAE_MACCESS_H
                     15: #define UAE_MACCESS_H
                     16: 
                     17: #include <SDL_endian.h>
                     18: 
1.1.1.2 ! root       19: #if (SDL_BYTE_ORDER == SDL_BIG_ENDIAN)
        !            20: #define do_get_mem_word(a) (*((uae_u16*)a))
        !            21: #define do_put_mem_word(a, v) (*((uae_u16*)a)) = v
        !            22: #define do_get_mem_long(a) (*((uae_u32*)a))
        !            23: #define do_put_mem_long(a, v) (*((uae_u32*)a)) = v
        !            24: #else
        !            25: #define do_get_mem_word(a) __builtin_bswap16(*((uae_u16 *)(a)))
        !            26: #define do_put_mem_word(a, v) *((uae_u16 *)(a)) = __builtin_bswap16(v) 
        !            27: #define do_get_mem_long(a) __builtin_bswap32(*((uae_u32 *)(a)))
        !            28: #define do_put_mem_long(a, v) *((uae_u32 *)(a)) = __builtin_bswap32(v)
        !            29: #endif
1.1       root       30: 
1.1.1.2 ! root       31: #define do_get_mem_byte(a) (*((uae_u8*)a))
        !            32: #define do_put_mem_byte(a, v) (*((uae_u8*)a)) = v
1.1       root       33: 
                     34: #endif /* UAE_MACCESS_H */

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.