Skip to content

Commit

Permalink
fixes for variable type information in new debug data
Browse files Browse the repository at this point in the history
remove old code relating to REAL type which doesnt even exist
  • Loading branch information
dmcoles committed May 26, 2024
1 parent c1cd7d9 commit b86ec53
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 27 deletions.
49 changes: 24 additions & 25 deletions E-VO.S
Original file line number Diff line number Diff line change
Expand Up @@ -10093,7 +10093,7 @@ SRCFN: DC.L 0
DC.B '$VER:'
TITLE: DC.B 'E-VO',160,'E',160,'Compiler'
DC.B '/Assembler/Linker/PP',160,'v3.8.0-dev',160
DC.B '(24.05.2024)'
DC.B '(26.05.2024)'
DC.B 10,'developing as "EC"',160
DC.B '''1991-97',160,'by Wouter van Oortmerssen',10
DC.B 'developing as "GEC"',160
Expand Down Expand Up @@ -10929,15 +10929,15 @@ SYMEND:
cmp.w #1,d0
bne.s .n1a
moveq #1,d0 ;vartype 1 (CHAR)
btst #3,OFLAGS(a1) ;force signed
btst #3,OFLAGS(a1) ;force unsigned
beq .is1
moveq #2,d0 ;vartype 2 (BYTE)
bra .is1
.n1a:
cmp.w #2,d0
bne.s .n2a
moveq #3,d0 ;vartype 3 (INT)
btst #4,OFLAGS(a1) ;force unsigned
btst #4,OFLAGS(a1) ;force signed
beq.s .is1
moveq #4,d0 ;vartype 4 (WORD)
bra.s .is1
Expand All @@ -10962,22 +10962,22 @@ SYMEND:
cmp.w #1,d0
bne.s .n1
moveq #7,d0 ;vartype 7 (PTR TO CHAR)
btst #3,OFLAGS(a1) ;force signed
btst #3,OFLAGS(a1) ;force unsigned
beq.s .is1
moveq #8,d0 ;vartype 8 (PTR TO BYTE)
bra.s .is1
.n1:
cmp.w #2,d0
bne.s .n2
moveq #9,d0 ;vartype 9 (PTR TO INT)
btst #4,OFLAGS(a1) ;force unsigned
btst #4,OFLAGS(a1) ;force signed
beq.s .is1
moveq #10,d0 ;vartype 10 (PTR TO WORD)
bra.s .is1
.n2:
cmp.w #4,d0
bne.s .n3
moveq #7,d0 ;vartype 7 (PTR TO CHAR)
moveq #11,d0 ;vartype11 (PTR TO LONG)
bra.s .is1
.n3:
MOVE.L D0,A2
Expand Down Expand Up @@ -11058,38 +11058,34 @@ SYMEND:
cmp.l #1,d0
bne.s .n1
moveq #7,d0 ;vartype 7 (PTR TO CHAR)
btst #6,VARFLAGS(a1) ;force signed
btst #5,VARFLAGS(a1) ;force unsigned
beq.s .is1
moveq #8,d0 ;vartype 8 (PTR TO BYTE)
bra.s .is1

.n1:
cmp.l #2,d0
bne.s .n2
moveq #9,d0 ;vartype 9 (PTR TO INT)
btst #5,VARFLAGS(a1) ;force unsigned
btst #6,VARFLAGS(a1) ;force signed
beq.s .is1
moveq #10,d0 ;vartype 10 (PTR TO WORD)
bra.s .is1
.n2:
cmp.l #4,d0
bne.s .n3
moveq #11,d0 ;vartype 11 (PTR TO LONG)
btst #6,VARFLAGS(a1) ;is long
beq.s .is1
moveq #7,d0 ;vartype 7 (PTR TO CHAR)
bra.s .is1
.n3:
moveq #6,d0 ;vartype 6 (OBJECT)

cmp.w #0,VAR_PTRREPCOUNT(a1)
bne.s .is1

moveq #12,d0 ;vartype 12 (PTR TO OBJECT)
bra.s .nptrrep

.is1:
subq #7,d0 ;ptr types offset (not a ptr type)

cmp.w #-1,VAR_PTRREPCOUNT(a1)
beq.s .nptrrep

addq #7,d0 ;ptr types offset (restore old value, was a ptr type)

cmp.w #0,VAR_PTRREPCOUNT(a1)
beq.s .nptrrep
Expand All @@ -11099,13 +11095,13 @@ SYMEND:

tst.l VAR_DIMDATA(a1)
beq.s .narr
cmp.w #6,d0
cmp.w #6,d0 ;object type
bne.s .notobj

moveq #19,d0
moveq #19,d0 ;ptr to object
bra.s .narr
.notobj
addq #7,d0 ;array types offset
add.l #14,d0 ;array types offset
.narr:


Expand Down Expand Up @@ -11253,7 +11249,7 @@ SYMEND:
;handle byte and word types

MOVE.B OFLAGS(A0),D0
AND.W #%11000,D0 ;forcesigned and forceunsigned flags
AND.W #%11000,D0 ;forceunsigned and forcesigned flags
ROR.W #3,D0 ;shift flags into lowest bits

MOVE.W D0,(A5)+
Expand Down Expand Up @@ -13917,9 +13913,12 @@ LDEF: MACRO
BSET #7,VARFLAGS(a0) ;set LONG var flag
CMP.W #IOFF+20,-2(A3) ; a:LONG
BEQ .1
CMP.W #IOFF+61,-2(A3) ; a:REAL
BNE .REG
BRA .1
;this was from E v3.3a
;but makes no sense as REAL is not an actual type
;IOFF+61 is "END"
;CMP.W #IOFF+61,-2(A3) ; a:REAL
;BNE .REG
;BRA .1
.REG: CMP.W #IOFF+60,-2(A3) ; a:REG
BNE .OBJ

Expand Down Expand Up @@ -25815,7 +25814,7 @@ i2ERROR39:
BMI.S .not13

MOVE.W (A0)+,D0
ROL.W #3,D0 ; shift bits into positions 3 and 4 (forcesigned and forceunsigned flags)
ROL.W #3,D0 ; shift bits into positions 3 and 4 (forceunsigned and forcesigned flags)
OR.B D0,-16(A5) ; flags
.not13
MOVE.W (A0)+,-6(A5) ; PTRREPCOUNT
Expand Down
4 changes: 2 additions & 2 deletions Technical_info.txt
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ OBJECT ident_lex_parse
ENDOBJECT

0/1 1/2 2/4 3/8 4/16 5/32 6/64 7/128
flags = SET USED,SYS_VAR,EXPORT (*),REG,REAL|METHOD,FORCEUNSIGNED,FORCESIGNED, SIZE=LONG
flags = SET USED,SYS_VAR,EXPORT (*),REG,REAL|METHOD,FORCEUNSIGNED(BYTE),FORCESIGNED(WORD), SIZE=LONG
(*) = in mainsource var komt uit module, variable coalescing
etype = PTR TO [1,2,4] | PTR TO <object>
info = [if_arg_then_offset,0,lab=-1 | proc=-2 | -3/-4 code in other module]
Expand Down Expand Up @@ -238,7 +238,7 @@ ENDOBJECT
OBJECT member
onext:PTR TO member -4
ooff:INT 0, offset
oflags:CHAR 2, SET PRIVATE,EXTRA_TYPED,UNION,FORCESIGNED,FORCEUNSIGNED
oflags:CHAR 2, SET PRIVATE,EXTRA_TYPED,UNION,FORCEUNSIGNED(BYTE),FORCESIGNED(WORD),LONG
dummy:CHAR 3, _empty_spot_
osize:INT 4, fieldsize [1,2,4,0=array]
oid:INT 6, object ID
Expand Down

0 comments on commit b86ec53

Please sign in to comment.