Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ARCv3] HS5x - absence of support for atomic llockd/scondd instructions #505

Closed
pavelvkozlov opened this issue Jan 12, 2023 · 5 comments
Closed

Comments

@pavelvkozlov
Copy link

According to the PRM for 32-bit ARCv3 processors (ARC HS5x) atomic instructions llockd and scondd for 64-bit data are available and it would be great to have a support in the tools.
We need this to add optimized set of atomic64_* functions to the Linux kernel for the HS5x.

Now, code like the following returns assembler error:

  __asm__ __volatile__ (
  	"1:\n"
  	"llockd %0, %1\n"
  	"add.f %L0, %L0, %L2\n"
  	"adc %H0, %H0, %H2\n"
  	"scondd %0, %1\n"
  	"bnz 1b\n"
  	: "=&r"(a64), "+ATOMC"(counter)
  	: "ir"(b64)
  	:"cc", "memory");
...
Error: unknown opcode 'llockd' 
Error: unknown opcode 'scondd'
@abrodkin
Copy link
Member

Temporary work-around for the Linux kernel for ARC HS58 is available here: foss-for-synopsys-dwc-arc-processors/linux@71455c6.

@claziss
Copy link
Contributor

claziss commented Jan 13, 2023

@claziss claziss assigned pavelvkozlov and unassigned claziss Jan 13, 2023
@abrodkin abrodkin modified the milestones: 2023.03, 2022.09 Jan 13, 2023
@abrodkin
Copy link
Member

Fix back-ported to arc-2022.09 - foss-for-synopsys-dwc-arc-processors/binutils-gdb@c89aa1c.
@pavelvkozlov once new engineering build is out with that fix, please re-try and close this issue.

@claziss
Copy link
Contributor

claziss commented Jan 23, 2023

@BrunoASMauricio Please implement them in QEMU

@abrodkin
Copy link
Member

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

No branches or pull requests

4 participants