Ticket #1 (closed defect: fixed)

Opened 6 years ago

Last modified 2 years ago

Recognize CPU directive and handle properly

Reported by: peter@tortall.net Assigned to: peter@tortall.net
Priority: P2 Milestone: 0.3.0
Component: Parser: NASM-compatible Version: other
Severity: normal Keywords:
Cc:

Description

It's often nice to restrict certain code to a certain CPU instruction set. It's
probably also desireable to allow newer instructions than the selected CPU to be
used as identifiers (but this is debatable; it makes sense for older code but
may make new code unnecessarily confusing). To be decided: the format of the CPU
directive in specifying what instructions to allow (ranges would probably be
useful as well as additional CPU feature flags.. but how to combine the two?).
Then the CPU setting needs to be tested against the CPU flags on each
instruction: if the instruction doesn't fit within the current CPU setting,
either a) treat it as a regular identifier/label, or b) error saying
"unsupported" or somesuch. A bitmask is probably the best way to test for the
CPU setting.

Attachments

Change History

07/12/02 00:04:38 changed by peter@tortall.net

  • target_milestone changed from 0.2.0 to 0.3.0.
  • dependson set to 3.

08/05/02 17:51:44 changed by peter@tortall.net

This will be fixed in the new arch-separated lexer/parser.

08/05/02 17:52:27 changed by peter@tortall.net

  • status changed from new to assigned.
I'm working on the new lexer/parser.

08/08/02 22:50:13 changed by peter@tortall.net

  • status changed from assigned to resolved.
  • resolution set to fixed.
The new lexer/parser code (see Bug#1) has CPU directive support.

Add/Change #1 (Recognize CPU directive and handle properly)