diff --git a/CGI.pas b/CGI.pas index bf39922..225e231 100644 --- a/CGI.pas +++ b/CGI.pas @@ -857,6 +857,9 @@ if codeGeneration then begin else if (baseTypeEnum(fp1) in [cgUByte]) and (baseTypeEnum(fp2) in [cgByte,cgUByte]) then goto 1 + else if (baseTypeEnum(fp1) = cgByte) + and (baseTypeEnum(fp2) = cgUByte) then + lcode^.q := (ord(cgWord) << 4) | ord(cgUByte) else lcode^.q := (fp1 << 4) | fp2; diff --git a/Gen.pas b/Gen.pas index a925a4c..4578189 100644 --- a/Gen.pas +++ b/Gen.pas @@ -1131,7 +1131,6 @@ const {note: these constants list all legal } cExtended = $09; cVoid = $0B; - byteToUByte = $01; byteToWord = $02; byteToUword = $03; byteToLong = $04; @@ -1250,7 +1249,7 @@ else if op^.q in [ubyteToLong,ubyteToUlong,uwordToLong,uwordToUlong] then GenImplied(m_pha); end; {else} end {else if} -else if op^.q in [byteToUByte,wordToByte,wordToUbyte,uwordToByte,uwordToUbyte] then +else if op^.q in [wordToByte,wordToUbyte,uwordToByte,uwordToUbyte] then GenNative(m_and_imm, immediate, $00FF, nil, 0) else if op^.q in [byteToReal,uByteToReal,wordToReal] then GenCall(11)