About asm for TriCore297

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
User17897
Level 2
Level 2
I write asm code with HighTech, I select tricore-gcc as my asm-tool, and I found some problems
I found the rule of tricore-gcc for asm is different from the asm-tool in the "TriCore DSP Optimization Guide".
for example, some codes always compiled NG:
mulr.h %d3, %d4, %d5 ll, 1
maddsur.h %d4,%d3,%d4,%d5 uu, 1
the compiler always told me:
../src/cycleTest.S:18: error: Opcode/operand mismatch: mulr.h %d3,%d4,%d5 ll,1
../src/cycleTest.S:20: error: maddsur.h %d4,%d3,%d4,%d5 uu,1: Too many operands
I don't know how change my code.
Can I get the asm language guide for TriCore-gcc? how and where?

Another problem, I think TriCore can provide intrinsic(C language) for the DSP instruction.
I don't know how to obtain these instrinsic's guide, Is there anyone can tell me?
0 Likes
5 Replies
User13290
Level 5
Level 5
First like received First solution authored

Hi Shaquille,

Concerning your first question, the ll suffix needs to be appended to the register. So rather than using:


mulr.h %d3,%d4,%d5 ll,1


You'll have to use this instead:


mulr.h %d3,%d4,%d5ll,1


For your 2nd question I think you're referring DSP lib source code, developed by Infineon. This is probably available via the MyICP channel. If you've not signed up to it yet then you can use this link to do so.

Best regards,

Henk-Piet Glas

Principal Technical Specialist
Embedded Software

0 Likes
User17897
Level 2
Level 2
Dear Henk-Piet Glas:
Thanks for your promption for my 1st question.
2nd, I don't mean "DSP lib", I mean "intrinsic function", for example:
c code __mulr(....) -> asm code mulr
c code __madd(...) -> asm code madd
and so on....
I cannot find this instrinsics' guide in myICP.
0 Likes
User13290
Level 5
Level 5
First like received First solution authored

Hi Shaquille,

The AURIX tools support a number of builtin functions. These are listed in chapters 7.1 and 7.2 of your user manual. In addition we support a number of intrinsics as well. These can be added to your source code using:


#include

int main(void) {
/* whatever */
return 0;
}


Physically this file can be found in tricore/include/machine relative to the root of your installation.

The specific intrinsics that you are referring to, do not exist in our tools. You either have to create them yourself using either C or inline assembly (see chapter 8 of our user manual) or you need to discuss this with your Infineon representative.

Best regards,

Henk-Piet Glas

Principal Technical Specialist
Embedded Software

0 Likes
User17897
Level 2
Level 2
thanks for your help
0 Likes
User13290
Level 5
Level 5
First like received First solution authored
icework wrote:
thanks for your help



No problem. Happy to help.

Best regards,

Henk-Piet Glas

Principal Technical Specialist
Embedded Software

0 Likes