Is there an automated tool that can parse nasm input or object file
output and tell me which instruction set(s) are needed to run the code
without an illegal instruction violation?
Would it be possible to have nasm produce this information as an
optional report?
This would be very useful as a formal method to avoid the need to test
software on every x86 processor.
Thanks IA
|
|
0
|
|
|
|
Reply
|
johnf
|
9/24/2003 12:00:20 PM |
|
ea913 wrote:
> Is there an automated tool that can parse nasm input or object file
> output and tell me which instruction set(s) are needed to run the code
> without an illegal instruction violation?
>
> Would it be possible to have nasm produce this information as an
> optional report?
>
> This would be very useful as a formal method to avoid the need to test
> software on every x86 processor.
Well, Nasm's got the "cpu" directive.
Options are:
* CPU 8086 Assemble only 8086 instruction set
* CPU 186 Assemble instructions up to the 80186 instruction set
* CPU 286 Assemble instructions up to the 286 instruction set
* CPU 386 Assemble instructions up to the 386 instruction set
* CPU 486 486 instruction set
* CPU 586 Pentium instruction set
* CPU PENTIUM Same as 586
* CPU 686 P6 instruction set
* CPU PPRO Same as 686
* CPU P2 Same as 686
* CPU P3 Pentium III (Katmai) instruction sets
* CPU KATMAI Same as P3
* CPU P4 Pentium 4 (Willamette) instruction set
* CPU WILLAMETTE Same as P4
* CPU PRESCOTT Prescott instruction set
* CPU IA64 IA64 CPU (in x86 mode) instruction set
If you used "cpu P3", it would error out on any P4 instructions, etc.
The processor information encoded with the instructions is known to have
been quite buggy when this feature was introduced - 32-bit instructions
marked as "8086", for example. I don't know if we've got 'em all right,
still. I doubt if it would substitute for testing, unless *thoroughly*
verified, and it isn't very "fine grained". Might be *some* help...
Best,
Frank
|
|
0
|
|
|
|
Reply
|
Frank
|
9/25/2003 7:03:35 AM
|
|