using extended thumb instruction in assembly on S32K146

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

using extended thumb instruction in assembly on S32K146

ソリューションへジャンプ
1,704件の閲覧回数
KelvinSmith
Contributor III

I have been optimizing some code on the S32K146 processor, converting some of it to assembly language. I am seeing that the C code uses instructions that the assembler won't allow, including:

cmn r0,#1

ldrsh r0,[r1]

push {r4-r11,lr}

All three of these are 4 byte instructions, as seen in the disassembly, so they are some kind of extended thumb instructions. (I haven't found any documentation on them.) The assembler gives various errors when it encounters them. The first two I can work around, but the push instruction is kind of necessary. (The push instruction will only allow registers up to r7, as it is). Does anyone know how to enable these?

ラベル(1)
0 件の賞賛
返信
1 解決策
1,684件の閲覧回数
KelvinSmith
Contributor III

I did a bunch of searching and found that these are called the thumb-2 instructions and they can be enabled by putting this at the top of the source file:

.syntax unified

元の投稿で解決策を見る

0 件の賞賛
返信
1 返信
1,685件の閲覧回数
KelvinSmith
Contributor III

I did a bunch of searching and found that these are called the thumb-2 instructions and they can be enabled by putting this at the top of the source file:

.syntax unified

0 件の賞賛
返信