Assembler that generates all M68k opcodes
Hello, for curiosity and for the sake of explanation of the relationship between assembly language and machine code, I would like to know if there are Amiga assemblers that allow to generate all m68k opcodes.
It seems to me that ASM-One (at least v 1.4x) does not generate some of them, for instance ADD #im, Dx (ASM-One "optimize" it with ADDI #im, Dx). What about PhxAss, Devpac, vasm? |
Quote:
|
Quote:
|
Quote:
Strictly speaking, ADD #IM,DX is not a valid instruction (i.e. does not exist) but most assemblers handle it automatically since it is clear that an immediate value should be added. |
Quote:
ADDI.W #$1234,D0 -> 0640 1234 If destination is a data register then there is ADD #IM,Dx AFAIK |
You are correct, add.x #IM,Dx is indeed allowed, I checked the reference manual. It's somewhat ambiguous though IMHO.
|
Quote:
Indeed, the only redundancies I have discovered up to now, are all related to the xxxI variants using a data register as destination operand: ADD # , Dx / ADDI # , Dx SUB # , Dx / SUBI # , Dx CMP # , Dx / CMPI # , Dx. AND# , Dx / ANDI # , Dx. OR # , Dx / ORI # , Dx. In contrast, there are no redundancied between ADD/ADDA, SUB/SUBA, etc. Well, another one is that you can use MOVEM to copy just 1 register, but I regard this as anavoidable. Please, let me know if you know others. |
Quote:
|
Quote:
Vasm's 68k backend supports all known 68000-68060, 68851, 6888x, CPU32 and ColdFire V2-V4e instructions. I remember just one ambiguous instruction: PFLUSHA. It exists for 68030, 68851, 68040 and 68060. The 68040/060 version has a different opcode, so the resulting code depends on the current cpu options. |
Quote:
Quote:
Quote:
Quote:
|
Quote:
I agree that it's almost useless to have both, but what I mean with the term "redundant" instruction is two different opcodes that have exactly the same semantics, for whatever values of the operands. I agree on your comment Quote:
Has PhxAss the same behavior, if you remember? |
Quote:
Quote:
It was probably also required because of reassembling. I worked closely together with Tim Rühsen in the mid-90s, who based his IRA reassembler on PhxAss. |
Quote:
Thanks again for the info! |
All times are GMT +2. The time now is 20:59. |
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.