Efficientness of Compiler Generated Code

John Hascall hascall at atanasoff.cs.iastate.edu
Sun Feb 19 04:24:36 AEST 1989


In article <7756 at ihlpf.ATT.COM> pcl at ihlpf.UUCP (pcl) writes:
>I wonder if any microprocessor supports HLL instruction such as:
>
>incbf memloc,bf_offset,bf_len		/* increment a bit field */
>setbf memloc,bf_offset,bf_len,immed	/* increment a bit field */
                                           ^^^^ set?

   A VAX (I guess we can consider a uVAX a uProcessor :-) could
   do something like this for "incbf":

      EXTV  #pos,#bits,base,temp      ; extract and extend base<pos:pos+bits-1>
      INCL  temp                      ; increment
      INSV  temp,#pos,#bits,base      ; insert into base<pos:pos+bits-1>

      and of course, just INSV can be used for "setbf".

John Hascall / ISU Comp Center



More information about the Comp.lang.c mailing list