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

arch: arc: fix the bug in prologue of sys call handling #21364

Conversation

vonhust
Copy link

@vonhust vonhust commented Dec 13, 2019

  • the old codes may not save the caller saved regs correctly,
    e.g. r7- r12. Because the sys call entry is called in the form
    of static inline function. The compiler optimizations may not save
    all the caller saved regs.

  • new codes use the irq stack frame as the sys call frame and gurantee
    all the called saved regs are pushed and popped correctly.

  • the side effect of new codes are more stack operations and a little
    overhead.

Signed-off-by: Wayne Ren wei.ren@synopsys.com

Fixes #21306

* the old codes may not save the caller saved regs correctly,
  e.g. r7- r12. Because the sys call entry is called in the form
  of static inline function. The compiler optimizations may not save
  all the caller saved regs.

* new codes use the irq stack frame as the sys call frame and gurantee
  all the called saved regs are pushed and popped correctly.

* the side effect of new codes are more stack operations and a little
  overhead.

Signed-off-by: Wayne Ren <wei.ren@synopsys.com>
@vonhust vonhust force-pushed the topic-backport-v1.14 branch from 341ead8 to 4c45a3b Compare December 13, 2019 09:44
@andrewboie
Copy link
Contributor

sanitycheck failure is spurious

@andrewboie andrewboie requested a review from nashif December 13, 2019 19:10
@nashif nashif added Backport Backport PR and backport failure issues and removed backport v1.14-branch labels Dec 13, 2019
@nashif nashif merged commit 33638bc into zephyrproject-rtos:v1.14-branch Dec 13, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: ARC ARC Architecture Backport Backport PR and backport failure issues
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants