This is the mail archive of the crossgcc@sources.redhat.com mailing list for the crossgcc project.
See the CrossGCC FAQ for lots more information.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
Other format: | [Raw text] |
Experiment: Try defining fixp_mul_32s_nX as a macro instead of an inline, and don't put values intended to be constants in temps (e.g. `p'). [gcc's "statement expressions" come in handy here]
#define fixp_mul_32s_nX( a, b, n ) ({ \ int _a = (a), _b = (b), res, tmp; \ __asm__ __volatile__ ( \ "smull %0, %1, %2, %3 \n\t" \ "movs %0, %0, lsr %4 \n\t" \ "adc %1, %0, %1, lsl %5 \n\t" \ : "=&r" (tmp), "=&r" (res) \ : "r" (_a), "r" (_b), "M" (n), "M" (32-n) \ ); \ res; \ })
int_res[j] = fixp_mul_32s_nX( int_a, int_b, 16 ); e0c65293 smull r5, r6, r3, r2 e1b05825 movs r5, r5, lsr #16 e0a56806 adc r6, r5, r6, lsl #16 e78e6104 str r6, [lr, r4, lsl #2]
-- Bryce Schober Design Engineer Dynon Avionics, Inc. www.dynonavionics.com
--- [This E-mail scanned for viruses by digiposs.com]
------ Want more information? See the CrossGCC FAQ, http://www.objsw.com/CrossGCC/ Want to unsubscribe? Send a note to crossgcc-unsubscribe@sources.redhat.com
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |