Aug 21, 2020
11:50 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Aug 21, 2020
11:50 AM
Hi, new to the forum but long time user of your products!
Using the newer compiler for the tc1.6.x through Aurix Studio 1.1.6 I am having a compiler error come up when attempting to use this inline asm instruction.
Attempted Instruction:
" register int d2_save __asm("%d2");"
Compiler Error:
E208: syntax error - token ";" inserted before "__asm"
1 errors, 0 warnings
If anyone has any insight that would be great!
C
Using the newer compiler for the tc1.6.x through Aurix Studio 1.1.6 I am having a compiler error come up when attempting to use this inline asm instruction.
Attempted Instruction:
" register int d2_save __asm("%d2");"
Compiler Error:
E208: syntax error - token ";" inserted before "__asm"
1 errors, 0 warnings
If anyone has any insight that would be great!
C
- Tags:
- IFX
2 Replies
Aug 21, 2020
01:31 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Aug 21, 2020
01:31 PM
Hi C. What assembly code are you trying to end up with? Here's an example of something similar:
int in;
// store the register holding *in* to 0x70000000
__asm( "st.w 0x70000000,%0"
:
: "d" (in) );
Aug 21, 2020
02:20 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Aug 21, 2020
02:20 PM
Hey thanks for the reply!
I am simply trying to save the register locally so that it does not get overwritten in the function to follow. This was the best way to do so in the past for me. Only the declaration of the register was necessary to write in the __asm method. Not sure why the newer compiler doesn't work in the same fashion.
I am simply trying to save the register locally so that it does not get overwritten in the function to follow. This was the best way to do so in the past for me. Only the declaration of the register was necessary to write in the __asm method. Not sure why the newer compiler doesn't work in the same fashion.