Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!uunet!husc6!mit-eddie!ll-xn!ames!amdcad!neptune!brian From: brian@neptune.AMD.COM (Brian McMinn) Newsgroups: comp.arch Subject: Arithmetic Traps in 29000 Message-ID: <490@neptune.AMD.COM> Date: Wed, 18-Nov-87 22:56:59 EST Article-I.D.: neptune.490 Posted: Wed Nov 18 22:56:59 1987 Date-Received: Sat, 21-Nov-87 13:40:16 EST References: <1656@geac.UUCP> <863@winchester.UUCP> <197@m2.mfci.UUCP> <902@mips.UUCP> <8933@utzoo.UUCP> <6743@apple.UUCP> <3440@ames.arpa> Reply-To: brian@neptune.AMD.COM (Brian McMinn) Organization: Advanced Micro Devices, Inc., Austin, Texas Lines: 21 In article <3440@ames.arpa> lamaster@ames.UUCP (Hugh LaMaster) writes: >Do the "trap" type instructions interact with a mask in the user context >which sets which conditions will trap The Am29000 add/subtract instructions only check for the specific kind of "wrongness" that is peculiar to that type of add or subtract. In all cases, the trap is taken if the answer is "wrong". For example, the adds (add signed) operation will trap if the correct result would not fit into a 32-bit signed integer. The addu (add unsigned) operation will trap if the correct result would not fit into an unsigned 32-bit integer. The add (add and don't ask dumb questions :-) operation performs no checking. Using these instructions, the user can specify the proper form of overflow checking on an operation by operation basis (even finer granularity than having a user register keep track of whether to trap on Overflow or Carry). brian@neptune.amd.com -- Brian McMinn brian@neptune.AMD.COM Advanced Micro Devices Austin, Texas 1-(512)-462-5389