[otbn-as] Generate .line numbers to fix up DWARF information
[otbn-as] Generate .line numbers to fix up DWARF information

To try this out, run something like this from the hw/ip/otbn/util
directory:

  ./otbn-as -g -o tmp.o ../dv/otbnsim/test/simple/pseudos/li.s
  ./otbn-objdump -dS tmp.o

The result looks like this:

  00000000 <.text>:
      expansion was correct is a little difficult, unless you can run the
      generated instructions... which is what we can do for ISS testing. So the
      checks seem to fit quite well here.

  */
    li x2, 1230
     0:   4ce00113                li      sp,1230
    li x3, -123
     4:   f8500193                li      gp,-123
    li x4, 2272
     8:   00001237                lui     tp,0x1
     c:   8e020213                addi    tp,tp,-1824 # 8e0 <.text+0x8e0>

    /* Big immediates that can be done with a single LUI */
    li x5, 1048576
    10:   001002b7                lui     t0,0x100
    li x6, -0x800000
    14:   ff800337                lui     t1,0xff800

As a bonus, this commit also slightly improves how we print
instructions that we've assembled or pseudo-instructions that we've
expanded. This won't make any difference unless debugging
otbn-as (with the --otbn-translate flag), but it should make li
instructions a bit less confusing when that happens.

Signed-off-by: Rupert Swarbrick <290093e2ad2515ed2f14d749293c8cf8e02ca274@lowrisc.org>

lowRISC/opentitan,lowRISC/opentitan,lowRISC/opentitan,lowRISC/opentitan,lowRISC/opentitan,lowRISC/opentitan