Uclinux-2008r1-rc8 (bf561) to VDSP5 transplantation (in): Problems with Kernel_thread_helper

Source: Internet
Author: User

There is a function in ARCH/BLACKFIN/KERNEL/PROCESS.C:

/*
* This gets run with P1 containing the
* function to call, and R1 containing
* the "args". Note P0 is clobbered on the way here.
*/
void kernel_thread_helper(void);
__asm__(".section .text/n"
".align 4/n"
"_kernel_thread_helper:/n/t"
"/tsp += -12;/n/t"
"/tr0 = r1;/n/t" "/tcall (p1);/n/t" "/tcall _do_exit;/n" ".previous");

It will raise an error:

[Error ea5004] "c:/temp/acc06a8ef03000/acc06a8ef03001.s":67 Syntax Error in :
.align 2;
syntax error is at or near text '.align'.
Attempting error recovery by ignoring text until the ';'
Previous errors prevent assembly
Assembler totals: 1 error(s) and 0 warning(s)
cc3089: fatal error: Assembler failed

You can't find it. Align 2 this line of statements.

After blocking these assembly lines by line, the problem was found in the ". Previous" line, checked. Previous:

The .PREVIOUS directive instructs the assembler to set the current section in memory to the section described immediately before the current one. The .PREVIOUS directive operates on a stack.
Syntax:
   .PREVIOUS;
The following examples provide valid and invalid cases of the use of the consecutive .PREVIOUS directives.

Hey, the original missing a semicolon, affecting the following C program generation.

Replaced by ". Previous;" After the fix.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.