This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

multiply operation problem


Hi,

I am trying to port a new processor for gcc. Currently, i am able to compile
normal arithmetic and logical instructions by defining respective patterns
in md file. I am stuck at a point where i try to do 16 x 16 multiply
operation to produce 32 bit result and architecture of processor is 32 bit.

1. I am using mulhisi3 pattern but gcc is not picking that up to generate
assembly.
2. Do i need to define particular macros to do operations in HImode ( 16
bit).
3. I am using typecasting in my c program that should logically put 32 bit
result in register, this is my test case



short int a;
short int b;
int c;

a= 10;
b=5;
c = (int) a * b;


I think the problem is in typecasting beacuse in the assembly generated , 0
is moved into the registers and they are multiplied, mean somehow it is not
recongnising what to do in is size modified multiplication.


Please help

Thanks in advance


Rohit 
-- 
View this message in context: http://old.nabble.com/multiply-operation-problem-tp26498218p26498218.html
Sent from the gcc - Help mailing list archive at Nabble.com.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]