diff --git a/aes.c b/aes.c index 37008947f4ed547e0324618b06b1c6e5713dafbe..7e84f4643a25150e43a11c2c87552690169b3943 100644 --- a/aes.c +++ b/aes.c @@ -40,10 +40,6 @@ typedef uint32_t u32; typedef uint16_t u16; typedef uint8_t u8; -#define MAXKC (256/32) -#define MAXKB (256/8) -#define MAXNR 14 - /* This controls loop-unrolling in aes_core.c */ #undef FULL_UNROLL # define GETU32(pt) (((u32)(pt)[0] << 24) ^ ((u32)(pt)[1] << 16) ^ ((u32)(pt)[2] << 8) ^ ((u32)(pt)[3])) diff --git a/console.c b/console.c index e37397d2a0c07f82d8d304b134013cbf2741b954..52e3e57b8897995dd4c840dd1cd37d19891b36e1 100644 --- a/console.c +++ b/console.c @@ -28,7 +28,6 @@ //#define DEBUG_CONSOLE #define DEFAULT_BACKSCROLL 512 #define MAX_CONSOLES 12 -#define DEFAULT_MONITOR_SIZE "800x600" #define QEMU_RGBA(r, g, b, a) (((a) << 24) | ((r) << 16) | ((g) << 8) | (b)) #define QEMU_RGB(r, g, b) QEMU_RGBA(r, g, b, 0xff) diff --git a/cpu-exec.c b/cpu-exec.c index 7607e240b53951fc2e7518c8aaec78ea1104de37..cf7c1fba7ea8bc0a249ab6931705b8b714d7eeb4 100644 --- a/cpu-exec.c +++ b/cpu-exec.c @@ -18,7 +18,6 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301 USA */ #include "config.h" -#define CPU_NO_GLOBAL_REGS #include "exec.h" #include "disas.h" #include "tcg.h" diff --git a/exec.c b/exec.c index 6010bc70c1a8e9f5c868005dbee6d92046683bb9..86ab7de87bcff5537b37af7a2b142703261940cf 100644 --- a/exec.c +++ b/exec.c @@ -63,9 +63,6 @@ #define SMC_BITMAP_USE_THRESHOLD 10 -#define MMAP_AREA_START 0x00000000 -#define MMAP_AREA_END 0xa8000000 - #if defined(TARGET_SPARC64) #define TARGET_PHYS_ADDR_SPACE_BITS 41 #elif defined(TARGET_SPARC) diff --git a/hw/cirrus_vga.c b/hw/cirrus_vga.c index fb8218990bab8a951fc46dfa897ae96bba2c3634..08fd4c29a66608238f16775ebc9f40619ab25307 100644 --- a/hw/cirrus_vga.c +++ b/hw/cirrus_vga.c @@ -49,8 +49,6 @@ * ***************************************/ -#define qemu_MIN(a,b) ((a) < (b) ? (a) : (b)) - // ID #define CIRRUS_ID_CLGD5422 (0x23<<2) #define CIRRUS_ID_CLGD5426 (0x24<<2) @@ -173,10 +171,6 @@ #define CIRRUS_MMIO_LINEDRAW_MODE 0x39 // byte #define CIRRUS_MMIO_BLTSTATUS 0x40 // byte -// PCI 0x02: device -#define PCI_DEVICE_CLGD5462 0x00d0 -#define PCI_DEVICE_CLGD5465 0x00d6 - // PCI 0x04: command(word), 0x06(word): status #define PCI_COMMAND_IOACCESS 0x0001 #define PCI_COMMAND_MEMACCESS 0x0002 diff --git a/hw/dma.c b/hw/dma.c index 971c8d466fd62e0dd81513f8be5f8eaa5eff7c40..b95407be91610bd59d9db5a72f8ed688fb7690ed 100644 --- a/hw/dma.c +++ b/hw/dma.c @@ -28,11 +28,9 @@ #define dolog(...) fprintf (stderr, "dma: " __VA_ARGS__) #ifdef DEBUG_DMA -#define lwarn(...) fprintf (stderr, "dma: " __VA_ARGS__) #define linfo(...) fprintf (stderr, "dma: " __VA_ARGS__) #define ldebug(...) fprintf (stderr, "dma: " __VA_ARGS__) #else -#define lwarn(...) #define linfo(...) #define ldebug(...) #endif diff --git a/hw/eepro100.c b/hw/eepro100.c index 9dd67fe689ee453b6c57c25dea0594b6abc0019a..2948d3c154943bde011bc601d4c65b96f7856edb 100644 --- a/hw/eepro100.c +++ b/hw/eepro100.c @@ -47,22 +47,11 @@ /* Common declarations for all PCI devices. */ -#define PCI_VENDOR_ID 0x00 /* 16 bits */ #define PCI_DEVICE_ID 0x02 /* 16 bits */ #define PCI_COMMAND 0x04 /* 16 bits */ #define PCI_STATUS 0x06 /* 16 bits */ #define PCI_REVISION_ID 0x08 /* 8 bits */ -#define PCI_CLASS_CODE 0x0b /* 8 bits */ -#define PCI_SUBCLASS_CODE 0x0a /* 8 bits */ -#define PCI_HEADER_TYPE 0x0e /* 8 bits */ - -#define PCI_BASE_ADDRESS_0 0x10 /* 32 bits */ -#define PCI_BASE_ADDRESS_1 0x14 /* 32 bits */ -#define PCI_BASE_ADDRESS_2 0x18 /* 32 bits */ -#define PCI_BASE_ADDRESS_3 0x1c /* 32 bits */ -#define PCI_BASE_ADDRESS_4 0x20 /* 32 bits */ -#define PCI_BASE_ADDRESS_5 0x24 /* 32 bits */ #define PCI_CONFIG_8(offset, value) \ (pci_conf[offset] = (value)) @@ -199,12 +188,6 @@ typedef enum { ru_ready = 4 } ru_state_t; -#if defined(__BIG_ENDIAN_BITFIELD) -#define X(a,b) b,a -#else -#define X(a,b) a,b -#endif - typedef struct { #if 1 uint8_t cmd; @@ -1465,8 +1448,6 @@ static int nic_can_receive(void *opaque) //~ return !eepro100_buffer_full(s); } -#define MIN_BUF_SIZE 60 - static void nic_receive(void *opaque, const uint8_t * buf, int size) { /* TODO: diff --git a/hw/openpic.c b/hw/openpic.c index 46a2706b3dfa95a0256d1b9ea0f950b7595182ec..733284ae8d5a7b0a951c14e6a2bbf53e174f9722 100644 --- a/hw/openpic.c +++ b/hw/openpic.c @@ -44,7 +44,6 @@ #else #define DPRINTF(fmt, args...) do { } while (0) #endif -#define ERROR(fmr, args...) do { printf("ERROR: " fmr , ##args); } while (0) #define USE_MPCxxx /* Intel model is broken, for now */ diff --git a/hw/pckbd.c b/hw/pckbd.c index 3a004f7a8ef3475ab708ceb2a6c610e562981540..dd5265134b285247145077533e507ccdbe5da1f6 100644 --- a/hw/pckbd.c +++ b/hw/pckbd.c @@ -109,8 +109,6 @@ #define MOUSE_STATUS_ENABLED 0x20 #define MOUSE_STATUS_SCALE21 0x10 -#define KBD_QUEUE_SIZE 256 - #define KBD_PENDING_KBD 1 #define KBD_PENDING_AUX 2 diff --git a/hw/piix_pci.c b/hw/piix_pci.c index 53e20a0ab8ebd05aa71784d0346a6e848244f2ec..b8607aaa7ff34a209b5e9958cdc4c55acff9b25b 100644 --- a/hw/piix_pci.c +++ b/hw/piix_pci.c @@ -210,9 +210,6 @@ PCIBus *i440fx_init(PCIDevice **pi440fx_state, qemu_irq *pic) static PCIDevice *piix3_dev; PCIDevice *piix4_dev; -/* just used for simpler irq handling. */ -#define PCI_IRQ_WORDS ((PCI_DEVICES_MAX + 31) / 32) - static void piix3_set_irq(qemu_irq *pic, int irq_num, int level) { int i, pic_irq, pic_level; diff --git a/hw/sd.c b/hw/sd.c index fa1c02cf0e13ec098aa6ed5fe71db0fd68d2f9b0..4618883fa69c804f2c19826d2a603ec492943c11 100644 --- a/hw/sd.c +++ b/hw/sd.c @@ -242,8 +242,6 @@ static void sd_set_cid(SDState *sd) #define SECTOR_SHIFT 5 /* 16 kilobytes */ #define WPGROUP_SHIFT 7 /* 2 megs */ #define CMULT_SHIFT 9 /* 512 times HWBLOCK_SIZE */ -#define BLOCK_SIZE (1 << (HWBLOCK_SHIFT)) -#define SECTOR_SIZE (1 << (HWBLOCK_SHIFT + SECTOR_SHIFT)) #define WPGROUP_SIZE (1 << (HWBLOCK_SHIFT + SECTOR_SHIFT + WPGROUP_SHIFT)) static const uint8_t sd_csd_rw_mask[16] = { diff --git a/hw/slavio_intctl.c b/hw/slavio_intctl.c index dffa11539acd6cb90599d45d15265c97ca17cced..9ee5ff89b0118d6639409122828cb55c301225d6 100644 --- a/hw/slavio_intctl.c +++ b/hw/slavio_intctl.c @@ -77,7 +77,6 @@ typedef struct SLAVIO_CPUINTCTLState { #define MASTER_IRQ_MASK ~0x0fa2007f #define MASTER_DISABLE 0x80000000 #define CPU_SOFTIRQ_MASK 0xfffe0000 -#define CPU_HARDIRQ_MASK 0x0000fffe #define CPU_IRQ_INT15_IN 0x0004000 #define CPU_IRQ_INT15_MASK 0x80000000 diff --git a/hw/slavio_misc.c b/hw/slavio_misc.c index 79d4018fab1ade3e3f52c7285763c48f817e41c2..8da7f4ad98e915b7934daa409888ea12ac58d7b7 100644 --- a/hw/slavio_misc.c +++ b/hw/slavio_misc.c @@ -56,10 +56,7 @@ typedef struct MiscState { #define MISC_SIZE 1 #define SYSCTRL_SIZE 4 -#define LED_MAXADDR 1 -#define LED_SIZE (LED_MAXADDR + 1) -#define MISC_MASK 0x0fff0000 #define MISC_LEDS 0x01600000 #define MISC_CFG 0x01800000 #define MISC_DIAG 0x01a00000 diff --git a/loader.c b/loader.c index 55625cf5b01e94bdb7418de11e69b4a55361c564..5232ee12a71bcac747abaa084a2992cdb82addea 100644 --- a/loader.c +++ b/loader.c @@ -199,7 +199,6 @@ static void bswap_ahdr(struct exec *e) (N_MAGIC(x) == ZMAGIC ? _N_HDROFF((x)) + sizeof (struct exec) : \ (N_MAGIC(x) == QMAGIC ? 0 : sizeof (struct exec))) #define N_TXTADDR(x) (N_MAGIC(x) == QMAGIC ? TARGET_PAGE_SIZE : 0) -#define N_DATOFF(x) (N_TXTOFF(x) + (x).a_text) #define _N_SEGMENT_ROUND(x) (((x) + TARGET_PAGE_SIZE - 1) & ~(TARGET_PAGE_SIZE - 1)) #define _N_TXTENDADDR(x) (N_TXTADDR(x)+(x).a_text) diff --git a/slirp/misc.c b/slirp/misc.c index 662039185073b2eddc6a66a9cbd77fe2ff0eb8f5..581db880d99cf127af0ee8a1b82a599f068a1c5b 100644 --- a/slirp/misc.c +++ b/slirp/misc.c @@ -5,7 +5,6 @@ * terms and conditions of the copyright. */ -#define WANT_SYS_IOCTL_H #include u_int curtime, time_fasttimo, last_slowtimo; diff --git a/slirp/socket.c b/slirp/socket.c index 1c5dee35c6ae48b0d381352f78c7d2916e9d830b..098132a1bb9f6958cd8f96575fbdb0493bffce0f 100644 --- a/slirp/socket.c +++ b/slirp/socket.c @@ -6,7 +6,6 @@ */ #include "qemu-common.h" -#define WANT_SYS_IOCTL_H #include #include "ip_icmp.h" #ifdef __sun__ diff --git a/slirp/tcp_subr.c b/slirp/tcp_subr.c index b70f06e0624fdef1968e154c077b3bf24f51c205..9d020a662f04a09f044ab6eaecf711c17fff6fb7 100644 --- a/slirp/tcp_subr.c +++ b/slirp/tcp_subr.c @@ -38,7 +38,6 @@ * terms and conditions of the copyright. */ -#define WANT_SYS_IOCTL_H #include /* patchable/settable parameters for tcp */ diff --git a/target-sparc/helper.c b/target-sparc/helper.c index 7a2ac21d06faa55a147e29952ebbc9672eaab8e5..b39b16272b4efb70b0826d3b5230a8579790479b 100644 --- a/target-sparc/helper.c +++ b/target-sparc/helper.c @@ -1366,8 +1366,6 @@ void sparc_cpu_list(FILE *f, int (*cpu_fprintf)(FILE *f, const char *fmt, ...)) "fpu_version mmu_version nwindows\n"); } -#define GET_FLAG(a,b) ((env->psr & a)?b:'-') - void cpu_dump_state(CPUState *env, FILE *f, int (*cpu_fprintf)(FILE *f, const char *fmt, ...), int flags) @@ -1411,6 +1409,9 @@ void cpu_dump_state(CPUState *env, FILE *f, env->cansave, env->canrestore, env->otherwin, env->wstate, env->cleanwin, env->nwindows - 1 - env->cwp); #else + +#define GET_FLAG(a,b) ((env->psr & a)?b:'-') + cpu_fprintf(f, "psr: 0x%08x -> %c%c%c%c %c%c%c wim: 0x%08x\n", GET_PSR(env), GET_FLAG(PSR_ZERO, 'Z'), GET_FLAG(PSR_OVF, 'V'), GET_FLAG(PSR_NEG, 'N'), GET_FLAG(PSR_CARRY, 'C'), diff --git a/target-sparc/op_helper.c b/target-sparc/op_helper.c index 2f88f4c1e39f88abd21b5e95f9a46c08cfd3077a..947a55ad15b7b50100d6162bd9cee1a3a06cc286 100644 --- a/target-sparc/op_helper.c +++ b/target-sparc/op_helper.c @@ -29,8 +29,6 @@ do { printf("MXCC: " fmt , ##args); } while (0) #ifdef DEBUG_ASI #define DPRINTF_ASI(fmt, args...) \ do { printf("ASI: " fmt , ##args); } while (0) -#else -#define DPRINTF_ASI(fmt, args...) do {} while (0) #endif #ifdef TARGET_SPARC64 diff --git a/target-sparc/translate.c b/target-sparc/translate.c index 53997ae9366a5c28ddfa6a973fc1e8c81d40bafd..d059408ba159c4fcd46fe539d4950a559176c632 100644 --- a/target-sparc/translate.c +++ b/target-sparc/translate.c @@ -92,11 +92,9 @@ typedef struct DisasContext { #define GET_FIELD_SPs(x,a,b) sign_extend (GET_FIELD_SP(x,a,b), ((b) - (a) + 1)) #ifdef TARGET_SPARC64 -#define FFPREG(r) (r) #define DFPREG(r) (((r & 1) << 5) | (r & 0x1e)) #define QFPREG(r) (((r & 1) << 5) | (r & 0x1c)) #else -#define FFPREG(r) (r) #define DFPREG(r) (r & 0x1e) #define QFPREG(r) (r & 0x1c) #endif @@ -2846,24 +2844,6 @@ static void disas_sparc_insn(DisasContext * dc) #undef FMOVSCC #undef FMOVDCC #undef FMOVQCC -#define FMOVCC(size_FDQ, icc) \ - { \ - TCGv r_cond; \ - int l1; \ - \ - l1 = gen_new_label(); \ - r_cond = tcg_temp_new(); \ - cond = GET_FIELD_SP(insn, 14, 17); \ - gen_cond(r_cond, icc, cond); \ - tcg_gen_brcondi_tl(TCG_COND_EQ, r_cond, \ - 0, l1); \ - glue(glue(gen_op_load_fpr_, size_FDQ), T0) \ - (glue(size_FDQ, FPREG(rs2))); \ - glue(glue(gen_op_store_, size_FDQ), T0_fpr) \ - (glue(size_FDQ, FPREG(rd))); \ - gen_set_label(l1); \ - tcg_temp_free(r_cond); \ - } #define FMOVSCC(icc) \ { \ TCGv r_cond; \ diff --git a/vl.c b/vl.c index 2adfebfd598b4b70561268c5c88e290f55aa1fc9..b62a2d43786f210e527dae8cf2012b354374e44d 100644 --- a/vl.c +++ b/vl.c @@ -2914,8 +2914,6 @@ static void dumb_display_init(void) /***********************************************************/ /* I/O handling */ -#define MAX_IO_HANDLERS 64 - typedef struct IOHandlerRecord { int fd; IOCanRWHandler *fd_read_poll; diff --git a/vnc.c b/vnc.c index 9a7750a87084a8a816f0684c8ef1ff098139fb71..a4fad9583087fcd4dd4cf5627d5f1ba6b1e8010a 100644 --- a/vnc.c +++ b/vnc.c @@ -149,8 +149,6 @@ static const char *vnc_auth_name(VncDisplay *vd) { return "unknown"; } -#define VNC_SOCKET_FORMAT_PRETTY "local %s:%s" - static void do_info_vnc_client(Monitor *mon, VncState *client) { char *clientAddr =