Sat Sep 7 13:25:55 1996 James G. Smith <jsmith@cygnus.co.uk>
* config/tc-mips.c (COUNT_TOP_ZEROES): Added macro to count
leading zeroes.
(load_register): Ensure hi32 bits are not lost during lo32bit
processing. Fix shift offset that was overflowing into the next
instruction field. Add code to generate shorter sequences for
constants with a single contiguous seqeuence of ones.
Fri Sep 6 18:23:54 1996 James G. Smith <jsmith@cygnus.co.uk>
* gas/mips/dli.{s,d}: More test cases added.
NOTE: The COUNT_TOP_ZEROES macro is a bit bulky, and the same result
can be achieved by using a "standard" ffs() routine:
count = ffs(~v);
count = count == 0 ? 0 : 33 - count;
However the following timings (VR4300 CPU clock ticks on a CMA101
board) show the performance gain.
Number of ffs() for loop if/then/else conditional
leading ?:
zeroes
-------------------------------------------------------------------------------
0 167 179 266 251
1 1718 283 263 259
2 1670 379 287 295
3 1622 475 311 311
4 1574 571 295 287
5 1534 667 311 319
6 1478 763 307 299
7 1430 859 323 323
8 1382 962 287 295
9 1334 1051 319 311
10 1286 1154 299 307
11 1238 1250 323 331
12 1183 1346 299 307
13 1135 1442 331 323
14 1087 1546 311 319
15 1039 1642 335 343
16 991 1730 295 287
17 950 1834 311 319
18 895 1922 307 299
19 847 2026 331 323
20 799 2122 307 299
21 751 2218 323 323
22 703 2314 311 311
23 655 2417 343 335
24 599 2506 307 299
25 559 2602 331 331
26 511 2705 311 319
27 463 2801 343 335
28 407 2897 311 319
29 367 2993 343 335
30 311 3097 323 331
31 271 3185 355 355
32 215 3233 379 371