Compiler Support on StarCore

* y[18] = 0x0DC0

*

* y[19] = 0x0D80

*

* y[20] = 0x0D40

*

* y[21] = 0x0D00

*

* y[22] = 0x0CC0

*

* y[23] = 0x0C80

*

* y[24] = 0x0C40

*

* y[25] = 0x0C00

*

* y[26] = 0x0BC0

*

* y[27] = 0x0B80

*

* y[28]

= 0x0B40

*

* y[29]

= 0x0B00

*

* y[30]

= 0x0AC0

*

* y[31]

= 0x0A80

*

**********************************************************************/

main()

{

long res0, res1, res2, res3; short var0, var1, var2, var3; short n, i, *x_ptr;

x_ptr = &input[14]; /* x_ptr points to input[11], which is x[3] */

for(n=0; n<32; n+=4)

{

res0 = 0; res1 = 0; res2 = 0; res3 = 0;

var3 = *x_ptr--; /* var3 = x[n+3] */ var2 = *x_ptr--; /* var3 = x[n+2] */

var1

=

*x_ptr--;

/*

var3

=

x[n+1] */

var0

=

*x_ptr--;

/*

var3

=

x[n] */

/*** x_ptr now points to x[n-1] ***/

for(i=0; i<12; i++)

{

res0 = L_mac(res0, a[i], var0); res1 = L_mac(res1, a[i], var1); res2 = L_mac(res2, a[i], var2); res3 = L_mac(res3, a[i], var3);

var3 = var2; var2 = var1; var1 = var0;

32

Introduction to the SC140 Tools

Page 32
Image 32
Motorola SC140 user manual Compiler Support on StarCore