Skip to content

Floating-Point Rounding Modes #73

@ProfPierce

Description

@ProfPierce

I've been trying to understand the implementation of the floating-point instructions in RARS. It seems that for the computational instructions, a rounding mode must be specified as the fourth operand in the instruction. The language specification indicates that this is an optional field, and if not specified in the instruction, rounding defaults to the value contained in the frm field of the fcsr. It is recommended this field be 000 by default for Round to Nearest, ties to Even. If I don't include one of the valid mode options (dyn, rne, rtz, etc)., an error is produced from assembly stating pseudoinstructions aren't allowed. I have pseudoinstructions disabled because I want to use only basic instructions. Observing the fcsr register on the Control and Status tab, it appears the rounding mode is zero as I would expect. What am I missing? Is it the intention in RARS to require all instructions include explicit rounding modes as opposed to using the default in fcsr? Thank you for your time.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions