Path: utzoo!attcan!uunet!ncrlnk!ncr-sd!hp-sdd!hplabs!decwrl!labrea!rutgers!cs.utexas.edu!oakhill!davet From: davet@oakhill.UUCP (David Trissel) Newsgroups: comp.sys.m68k Subject: addq.w #n,sp and a pop quiz Keywords: C asm addq Message-ID: <1737@oakhill.UUCP> Date: 11 Dec 88 14:16:41 GMT References: <5005@bsu-cs.UUCP> <5460@cbmvax.UUCP> <1100@ncar.ucar.edu> <670@auspex.UUCP> Reply-To: davet@oakhill.UUCP (David Trissel) Distribution: na Organization: Motorola Inc., Austin Tx. Lines: 22 When I put the add.w into the compiler I wondered just how many people would see it and think that it must be wrong. Craig Ruff had it right in that the add.w requires 2 less bytes (and is faster) than add.l for cases where the immediate will fit in a word and where addq cannot be substituted by the assembler. Specifically the compiler generates this for popping arguments and so there is never any danger of the immediate value being too large. Instructions depending on esoteric architectural features such as the above separate the men from the boys. Here's another one: There is only one place in the instruction set where a data register is implicitly sign-extended. Where? I'll post the answer in a few days (if nobody else does.) -- Dave Trissel Motorola Semiconductor, Austin Texas if anyone knows the answer to this without can answer this one without looking This type of architectural usage separate the men from the boys. Here's another question on a subtlety which I doubt any of you would know without