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

Бэкэнд не может получить адрес переменной на стеке #3

Closed
Intelix8996 opened this issue Mar 17, 2024 · 1 comment

Comments

@Intelix8996
Copy link
Collaborator

Следующий код не собирается:

extern volatile int UART0_DATA;

__attribute__((noinline))
void write_char_ptr(char* c) {
    UART0_DATA = *c;
}

void __bootloader_panic_c() {
    char c = 'f';

    write_char_ptr(&c);
}

-O0:

fatal error: error in backend: Cannot select: 0x16dd8168be8: i16 = srl 0x16dd81689b8, Constant:i16<8>
  0x16dd81689b8: i16,ch = CopyFromReg 0x16dd81af058, Register:i16 %0
    0x16dd8168948: i16 = Register %0
  0x16dd8168fd8: i16 = Constant<8>
In function: write_char_ptr

-O1,2,3,s:

fatal error: error in backend: Cannot select: 0x1fd5fb34b18: i16 = FrameIndex<0>
In function: __bootloader_panic_c
@leadpogrommer
Copy link
Owner

С -O1 работает, -O0 пока не поддерживается

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

2 participants