Author Topic: [solved] Test if instruction exist on the target processor  (Read 7122 times)

Offline shaynox

  • Full Member
  • **
  • Posts: 118
  • Country: gr
[solved] Test if instruction exist on the target processor
« on: July 01, 2015, 10:37:56 AM »
Is it will be good that nasm detect automatically if instruction is unavailable of CPU target, and inform to the use before testing the executable ?

CPU target is about what is the instruction's belonging of CPU in source code.
« Last Edit: July 04, 2015, 06:57:43 PM by shaynox »

Offline Frank Kotler

  • NASM Developer
  • Hero Member
  • *****
  • Posts: 2667
  • Country: us
Re: Test if instruction exist on the target processor
« Reply #1 on: July 01, 2015, 05:38:29 PM »
What are you getting at, Shaynox? Are you unaware that this feature exists? ("cpu" directive) Are you observing that the feature is not well maintained? Are you volunteering to maintain it? (in which case, talk to the developer's list)

An example we've recently seen is "rdseed". The architecture name is apparently "Broadwell". Nasm seems not to know that name. "cpu x64" claims the instruction doesn't exist, "cpu ia64" allows it. What do you think Nasm "should" do here?

Best,
Frank


Offline shaynox

  • Full Member
  • **
  • Posts: 118
  • Country: gr
Re: Test if instruction exist on the target processor
« Reply #2 on: July 01, 2015, 05:56:14 PM »
Thanks for information.

Quote
Are you volunteering to maintain it?
It will be cool to maintain nasm, but I program only in asm and need to study how nasm work before, a lot of work so.

But the consumer is able to make some suggestion of this software no ? (even if it exists on this case x) )
« Last Edit: July 03, 2015, 11:32:10 PM by shaynox »

Offline Rob Neff

  • Forum Moderator
  • Full Member
  • *****
  • Posts: 429
  • Country: us
Re: Test if instruction exist on the target processor
« Reply #3 on: July 04, 2015, 04:48:15 PM »
But the consumer is able to make some suggestion of this software no ? (even if it exists on this case x) )

One of the things developers hate is responding to questions/suggestions that have already been clearly documented.  It suggests laziness on the part of the person making the suggestion since a simple "RTFM" would have provided the answer.  So, instead of spoon-feeding the answer you get the response of "RTFM".  Either that or the dev is just having a bad day.  ;)