diff options
author | Andrew Cagney <cagney@redhat.com> | 1997-10-14 09:39:05 +0000 |
---|---|---|
committer | Andrew Cagney <cagney@redhat.com> | 1997-10-14 09:39:05 +0000 |
commit | 7456a10d9b80ae68b7df7a9e801b076acdb58fb2 (patch) | |
tree | 40ffc9b6c1cfacd59e03781ecae074de1a37c08b /sim | |
parent | 055ee2977fb1d20d8db53f48a62fcec279458631 (diff) | |
download | gdb-7456a10d9b80ae68b7df7a9e801b076acdb58fb2.zip gdb-7456a10d9b80ae68b7df7a9e801b076acdb58fb2.tar.gz gdb-7456a10d9b80ae68b7df7a9e801b076acdb58fb2.tar.bz2 |
* sim-alu.h (ALU64_HAD_OVERFLOW): Define.
(ALU64_SUB): Define.
* Make-common.in (all): Build SIM_EXTRA_ALL first.
(.gdbinit): Remove dependencies, generate once per build.
Diffstat (limited to 'sim')
-rw-r--r-- | sim/common/ChangeLog | 8 | ||||
-rw-r--r-- | sim/common/Make-common.in | 6 | ||||
-rw-r--r-- | sim/common/sim-alu.h | 13 |
3 files changed, 21 insertions, 6 deletions
diff --git a/sim/common/ChangeLog b/sim/common/ChangeLog index f99c7d3..a42cdaa 100644 --- a/sim/common/ChangeLog +++ b/sim/common/ChangeLog @@ -1,3 +1,11 @@ +Mon Oct 13 11:34:50 1997 Andrew Cagney <cagney@b1.cygnus.com> + + * sim-alu.h (ALU64_HAD_OVERFLOW): Define. + (ALU64_SUB): Define. + + * Make-common.in (all): Build SIM_EXTRA_ALL first. + (.gdbinit): Remove dependencies, generate once per build. + Tue Oct 14 19:20:09 1997 Andrew Cagney <cagney@b1.cygnus.com> * sim-n-core.h (sim_core_read_aligned_N, diff --git a/sim/common/Make-common.in b/sim/common/Make-common.in index c0e200c..b40cb8e 100644 --- a/sim/common/Make-common.in +++ b/sim/common/Make-common.in @@ -73,6 +73,7 @@ SIM_PROFILE = @sim_profile@ SIM_ASSERT = @sim_assert@ SIM_ALIGNMENT = @sim_alignment@ +SIM_BITSIZE = @sim_bitsize@ SIM_DEFAULT_MODEL = @sim_default_model@ SIM_ENDIAN = @sim_endian@ SIM_FLOAT = @sim_float@ @@ -134,6 +135,7 @@ CONFIG_CFLAGS = @DEFS@ \ $(SIM_BSWAP) \ $(SIM_ASSERT) \ $(SIM_ALIGNMENT) \ + $(SIM_BITSIZE) \ $(SIM_ENDIAN) \ $(SIM_FLOAT) \ $(SIM_HARDWARE) \ @@ -167,7 +169,7 @@ EXTRA_LIBS = $(BFD_LIB) $(OPCODES_LIB) $(LIBIBERTY_LIB) \ LIB_OBJS = callback.o targ-map.o $(SIM_OBJS) -all: libsim.a run $(SIM_EXTRA_ALL) +all: $(SIM_EXTRA_ALL) libsim.a run libsim.a: $(LIB_OBJS) rm -f libsim.a @@ -433,7 +435,7 @@ config.h: stamp-h ; @true stamp-h: config.in config.status CONFIG_FILES= CONFIG_HEADERS=config.h:config.in $(SHELL) ./config.status -.gdbinit: config.status $(srcdir)/../common/gdbinit.in +.gdbinit: # config.status $(srcdir)/../common/gdbinit.in CONFIG_FILES=$@:../common/gdbinit.in CONFIG_HEADERS= $(SHELL) ./config.status ## End COMMON_POST_CONFIG_FRAG diff --git a/sim/common/sim-alu.h b/sim/common/sim-alu.h index 46306c9..98bbfd2 100644 --- a/sim/common/sim-alu.h +++ b/sim/common/sim-alu.h @@ -132,7 +132,7 @@ do { \ #define ALU64_ADD(VAL) \ do { \ unsigned64 val = (VAL); \ - unsigned64 alu_lo = alu_val + val); \ + unsigned64 alu_lo = alu_val + val; \ signed alu_carry = ((alu_lo & LSBIT64 (31)) != 0); \ alu_carry_val = (alu_carry_val \ + MSEXTRACTED64 (val, 0, 31) \ @@ -186,7 +186,8 @@ do { \ #define ALU64_SUB(VAL) \ do { \ - error("ALU_SUB64"); \ + signed64 subval = -(VAL); /* -MININT? */ \ + ALU64_ADD (subval); \ } while (0) #define ALU_SUB(VAL) XCONCAT3(ALU,WITH_TARGET_WORD_BITSIZE,_SUB)(VAL) @@ -334,11 +335,15 @@ do { \ (!(alu_overflow_val & MSBIT32 (0)) != !(alu_overflow_val & MSBIT32 (16))) #define ALU32_HAD_OVERFLOW \ - ((((unsigned64)(alu_overflow_val & BIT64(0))) >> 32) \ - != (alu_overflow_val & MSBIT64(32))) + ((((unsigned64)(alu_overflow_val & MSBIT64(0))) >> 32) \ + != (unsigned64)(alu_overflow_val & MSBIT64(32))) + +#define ALU64_HAD_OVERFLOW \ + ((alu_val & MSBIT64 (0)) != (alu_overflow_val & MSBIT64 (0))) #define ALU_HAD_OVERFLOW XCONCAT3(ALU,WITH_TARGET_WORD_BITSIZE,_HAD_OVERFLOW) + /* carry found in bit before sign */ #define ALU16_HAD_CARRY \ |