Whats the diff from a .lss & a .lst file

2 posts / 0 new
Last post
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hi Guyzz

I just had a peek into some of the assembler listings generated by WinAvr.

My main module is called main ....

WinAvr generates a main.lss file , that seams to contain the "Whole project" , and then there are .lst files generated for each separate module.

The funny part is that the assembly differsf from the .lst and the .lss file.

Almost as if the .lst is generated in a separate run from the .lss file

Is the .lss file generated after optimizing or ???

I have a place where i do a

uint16_t meas;

  meas <<=3

Thats xlated to : ("this is pseudo code imnot in front of my devel pc"):

ldi rxx,3
loop:
shift "left" x-low
shift "left w. carry" , x-high
dec rxx
bneq loop

in the .lst file.

But in the .lss file its suddenly this code :

ldi rxx,3
loop:
add x-low,x-low
addc x-high,x-high
dec rxx
bneq loop

I know a "<< 1" is = "*2" is = "x+x" , but was just wondering ....

Any hints here ??

I can post the read listings , tonight if someone is interested.

/Bingo

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hello Bingo,

the .lst is generated during assembly stage and
the .lss is generated by avr-objdump from the .elf file,
ist's kind of a disassemly.

If you take a closer look on the instruction set, you will find
the AVRs really do not have a LSL/ROL instruction. Theese are
replaced using ADD/ADC instructions. It is mentioned in the
instruction set manual.

The assembler knows both mnemonics for theese instructions, but
a disassembler usually can't tell the difference any more.

There are some more of theese double meaning instructions (for example status
register manipulating like SEI, CLI, ...).

/Berndt