WinARM .lst files

Gast #362105
Lesenswert?

Hallo,

ich will mich gerade in WinARM und den LPC2103 einarbeiten. Nun habe
ich folgendes Problem:

Ich möchte wissen, wie der Assemblercode aussieht, den der Compiler
erzeugt. Da gibt es die Files .lst und .lss.

Im .lst File steht nun z.B. folgendes:

  67:ledswitch.c   ****   while (1)
  68:ledswitch.c   ****   {
  78:ledswitch.c   ****     int value = 0xAE;
  79:ledswitch.c   ****     int t;
  80:ledswitch.c   ****       FIO0PIN = (value&1)<<LEDPIN;
  63                oc 1 83 0
  64 0068 EB2F01E5     mov  r3, #512
  81:ledswitch.c   ****       asm volatile ("nop");
  65                 r3, r0
  66 006c 0000A0E1     str  r3, [r1, #-4095]
  82:ledswitch.c   ****       value>>=1;
  83:ledswitch.c   ****       FIO0PIN = (value&1)<<LEDPIN;
  67                , #512
  68 0070 023CA0E3     .loc 1 40 0
  69 0074 EB3F01E5     bic  r2, r2, #-2147483648
  84:ledswitch.c   ****       value>>=1;
  85:ledswitch.c   ****       FIO0PIN = (value&1)<<LEDPIN;
  70                r  r2, [r1, #8]
  71 0078 EB3F01E5     .loc 1 41 0
  86:ledswitch.c   ****       value>>=1;
  87:ledswitch.c   ****       FIO0PIN = (value&1)<<LEDPIN;
  72                tr  r0, [r1, #4]
  73 007c EB3F01E5     .loc 1 43 0
  88:ledswitch.c   ****       value>>=1;
  89:ledswitch.c   ****       FIO0PIN = (value&1)<<LEDPIN;
  74                dr  r3, [ip, #416]
  75 0080 EB2F01E5     orr  r3, r3, #1
  90:ledswitch.c   ****       value>>=1;
  91:ledswitch.c   ****       FIO0PIN = (value&1)<<LEDPIN;
  76                tr  r3, [ip, #416]
  77 0084 EB3F01E5     .loc 1 44 0
  92:ledswitch.c   ****       value>>=1;
  93:ledswitch.c   ****       FIO0PIN = (value&1)<<LEDPIN;
  78                vn  r1, #-1073741824
  79 0088 EB2F01E5     sub  r1, r1, #12288
  94:ledswitch.c   ****       value>>=1;
  95:ledswitch.c   ****       FIO0PIN = (value&1)<<LEDPIN;
  80                dr  r3, [r1, #-4095]
  81 008c EB3F01E5     orr  r3, r3, r0
  96:ledswitch.c   ****       value>>=1;
  97:ledswitch.c   ****       FIO0CLR = (1<<LEDPIN);
  82                tr  r3, [r1, #-4095]
  83 0090 E33F01E5     .loc 1 45 0
  84 0094 F3FFFFEA     ldr  r2, [r1, #-4079]
  85                  bic  r2, r2, #512
  86                  str  r2, [r1, #-4079]
  87                .LBE6:
 112                  str  r3, [r1, #-4075]
DEFINED SYMBOLS




In Zeile 67 steht nun z.B. nur ", #512". Kann es sein dass WinARM
hier einen Bug hat. Auch endet das .lst File, ohne z.B. die "}" von
while (1) irgendwo anzuzeigen.

Was bedeutet in Zeile 63 "oc 1 83 0"? Ich bin mit ARM Assembler noch
nicht vertraut, aber sind Parameter nicht immer durch einen Doppelpunkt
getrennt?


*
  26                  .loc 1 39 0
  27                  mov  r1, #-536870912
  28 0010 0E12A0E3     add  r1, r1, #163840
  29 0014 0A1981E2     ldr  r3, [r1, #8]
  30 0018 083091E5     orr  r3, r3, #512
  31 001c 023C83E3     str  r3, [r1, #8]
  32 0020 083081E5     .loc 1 40 0
  33                  ldr  r2, [r1, #8]
  34 0024 082091E5     .loc 1 41 0
  35                  mov  r0, #512
  36 0028 020CA0E3     .loc 1 40 0
  37                  bic  r2, r2, #-2147483648
  38 002c 0221C2E3     str  r2, [r1, #8]
  39 0030 082081E5     .loc 1 41 0
  40                  str  r0, [r1, #4]
  41 0034 040081E5     .loc 1 43 0
  42                  ldr  r3, [ip, #416]
  43 0038 A0319CE5     orr  r3, r3, #1
  44 003c 013083E3     str  r3, [ip, #416]
  45 0040 A0318CE5     .loc 1 44 0
*


Und was bedeuten Zeilen wie ".loc 1 40 0", ".loc 1 41 0",... ?

Danke,
Bernd

Antwort schreiben

Bitte melde dich an, um einen Beitrag zu schreiben.

oder

Mit Google-Account einloggen

Die Registrierung ist kostenlos und dauert nur eine Minute.

Jetzt registrieren