#1 (Recognize CPU directive and handle properly) – The Yasm Modular Assembler Project

Ticket #1 (closed defect: fixed)

Opened 8 years ago

Last modified 3 years ago

Recognize CPU directive and handle properly

Reported by: peter@… Owned by: peter@…
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

comment:1 Changed 8 years ago by peter@…

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

comment:2 Changed 8 years ago by peter@…

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

comment:3 Changed 8 years ago by peter@…

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

comment:4 Changed 8 years ago by peter@…

  • 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)

Author



Action
as closed
Next status will be 'reopened'
 
Note: See TracTickets for help on using tickets.