Skip to content

SP_CLR_HALT clears PC #151

@hcs64

Description

@hcs64

Writing SP_CLR_HALT to SP_STATUS should continue running at whatever the current PC is. As implemented, this calls rsp_pipeline_init(), which zeroes out everything in the pipeline, including rsp->pipeline.ifrd_latch.pc.

Mostly this breaks the method I've been using of setting the PC (via SP_PC_REG) and then clearing halt and break. Execution will always start at 0. (I've seen other code do the same, but they were starting at 0 anyway.)

Saving PC around the rsp_pipeline_init() fixes this.

As an aside, I don't think the pipeline should be reset if SP_STATUS_HALT wasn't already set, but I haven't tested this.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions