From 6fc7f5fc7ac86c15ceaaf354376567c7688b586f Mon Sep 17 00:00:00 2001 From: Martin Preuss Date: Fri, 27 Sep 2024 01:23:16 +0200 Subject: [PATCH] avr: fixed clobber lists. --- avr/modules/com2/crc.asm | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/avr/modules/com2/crc.asm b/avr/modules/com2/crc.asm index e5c183e..9ed4cb4 100644 --- a/avr/modules/com2/crc.asm +++ b/avr/modules/com2/crc.asm @@ -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