avr: fixed clobber lists.

This commit is contained in:
Martin Preuss
2024-09-27 01:23:16 +02:00
parent 60c86c7598
commit 6fc7f5fc7a

View File

@@ -35,10 +35,10 @@ com2CalcAndAddChecksumByte:
; - X : pointer to packet buffer
; OUT:
; - CFLAG: set if okay, clear otherwise
; MODIFIED REGS: R16, R17 (R18, R20, X)
; MODIFIED REGS: R16, R17 (R18, R19, R20, X)
com2CheckMessageInBuffer:
rcall com2CalcMsgChecksum ; R16, R18, (R17, R20, X)
rcall com2CalcMsgChecksum ; (R16, R17, R18, R19, R20, X)
ld r17, X
cp r16, r17 ; should be equal
brne com2CheckMessageInBuffer_error
@@ -58,7 +58,7 @@ com2CheckMessageInBuffer_error:
; @return r16 crc8 checksum
; @return X points to position of checksum byte
; @param X pointer to packet buffer (points to checksum byte upon return)
; @clobbers R16, R18, R19, (R17, R20, X)
; @clobbers R16, R18 (R17, R19, R20, X)
com2CalcMsgChecksum:
adiw xh:xl, COM2_MSG_OFFS_MSGLEN
@@ -79,8 +79,7 @@ com2CalcMsgChecksum:
; @return X points directly after last checked byte
; @param X pointer to data to calc crc8 for
; @param r18 number of bytes to calc crc8 for
; @param r19 polynomial to use
; @clobbers: R16, R17, R18, R20, X
; @clobbers: R16, R17, R18, R19, R20, X
com2CrcCalc:
ldi r16, 0xff ; start crc