Skip to content

16bit atomic loads missing (LDRHHroX) #40

Description

@LadnerJonas

At Lingodb, we would like to ditch our tpde fork and instead use your upstream repository. The only instruction, that we use but is missing here, is LDRHHroX.

Our current hacky fix is:

// tpde-encodegen/src/arm64/Target.cpp Line 370
  if (Name == "LDRHHroX") {
    unsigned extension = mi.getOperand(3).getImm();
    unsigned sc = mi.getOperand(4).getImm();
    std::array<std::string, 4> mnemSuffix{"lsl", "uxtw", "sxtw", "sxtx"};
    if (extension != 0) {
      assert(0 && "check if the emitted code really uses this suffix (godbolt using the same compilation arguments)");
    }
    handle_noimm("LDRHr_" + mnemSuffix[extension], std::format(", {}", sc));
  }

As you probably notice, we only handle extension case = 0, so the remaining mnemSuffix should be double-checked for correctness. After this instruction is added, I think we can stop using our fork and directly use the upstream repository.

Thanks!

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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