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

Jumping to function return on P1 always generates long jump #427

Open
Wuerfel21 opened this issue Feb 5, 2024 · 0 comments
Open

Jumping to function return on P1 always generates long jump #427

Wuerfel21 opened this issue Feb 5, 2024 · 0 comments

Comments

@Wuerfel21
Copy link
Contributor

PRI {+noinline} test(a,b)
  if a > 0
    if b > 0
      return 1
    else
      return 2
  else
    if b > 0
      return 3
    else
      return 4
      'return test(b,a) + 1


PUB main
  outa := test(cnt,ina)

generates a lot of

 if_ae	rdlong	__pc,__pc
	long	@@@_test_ret

-style branches. If the function has an epilogue (see the commented out line), the problem disappears because everything jumps into the epilogue instead.

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

No branches or pull requests

1 participant