Skip to content

CCopyType has no effect #280

@Andreas-Bur

Description

@Andreas-Bur

The CHERI-RISC-V instruction CCopyType cd, cs1, cs2 seems to be not working if cd is the same as cs1. Here a small PoC:

# Init FPU

  lui	t4, 2
  csrw	mstatus, t4

# Program start

  cspecialrw	c1, ddc, cnull
  ccopytype	c2, c1, cnull
  ccopytype	c1, c1, cnull
  cgettag	x3, c1 # Stores 1 in x3
  cgettag	x4, c2 # Stores 0 in x4

I would have expected the tag of c1 to be cleared. The tag also doesn't seem to be copied in a valid case.

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