I need to do a multiplication in the keil and the following mistake goes out for me. It does not leave me to use MLU and MUL. Why?
error: A1477W: This register combination results in UNPREDICTABLE behaviour
I do not understand your question ... I am using Microvision 4 and not let me use either the MUL or MLA instruction, anyone can tell me why?
Hans means that your code is not generated by the compiler. it is already in assembly, thus this particular setting has no effect on it.
anyone can tell me why?
It's because in contrast to your statement, you rather obviously are using Thumb mode --- otherwise you wouldn't be getting a Thumb-only error message.
It's clear you don't know how you ended up in Thumb mode, but there you are.
All of this only strengthens my argument that at least right now you need to not do this in assembly. You need to learn the tools first, and you need to learn the finer points of ARM and Thumb assembly language. By then you hopefully will have learned how to decide what should be done in assembly and what shouldn't.
So. again, you might want to visit http://www.keil.com/books/armbooks.asp and look for titles about assembler...
Real ARM programmers assemble it themselves.
Neither MLA nor MUL allow the use of the first operand register as destination. This limitation also exists for ARM Code. Only a wide Thumb2 would allow this.
Regards Marcus http://www.doulos.com/arm/
agree.
your fault is to write asm code in the c style.
I guess "MLA R9,R3,R4,R2" will work.
That restriction is not mentioned in http://www.keil.com/support/man/docs/armasm/armasm_cihihggj.htm
In fact,
MLA R3,R4,R3,R2
will do.