📄 crc7.lst
字号:
###############################################################################
# #
# 25/May/2009 02:53:22 #
# IAR ANSI C/C++ Compiler V5.20.0.20892/W32 EVALUATION for ARM #
# Copyright 1999-2008 IAR Systems AB. #
# #
# Cpu mode = arm #
# Endian = little #
# Source file = F:\Diplomovka\IARprojects\Diplomovka\25.4.2009\getting-s #
# tarted-project-at91sam7x-ek-iar\getting-started-project- #
# at91sam7x-ek\external_libs\crc\crc7.c #
# Command line = F:\Diplomovka\IARprojects\Diplomovka\25.4.2009\getting-s #
# tarted-project-at91sam7x-ek-iar\getting-started-project- #
# at91sam7x-ek\external_libs\crc\crc7.c -D at91sam7x256 #
# -D flash -D TRACE_LEVEL=4 -lC #
# F:\Diplomovka\IARprojects\Diplomovka\25.4.2009\getting-s #
# tarted-project-at91sam7x-ek-iar\getting-started-project- #
# at91sam7x-ek\at91sam7x-ek\getting-started-project\ewp\at #
# 91sam7x256_flash\List\ --remarks --diag_suppress #
# Pe826,Pe1375 -o F:\Diplomovka\IARprojects\Diplomovka\25. #
# 4.2009\getting-started-project-at91sam7x-ek-iar\getting- #
# started-project-at91sam7x-ek\at91sam7x-ek\getting-starte #
# d-project\ewp\at91sam7x256_flash\Obj\ --no_cse #
# --no_unroll --no_inline --no_code_motion --no_tbaa #
# --no_clustering --no_scheduling --debug --endian=little #
# --cpu=ARM7TDMI -e --fpu=None --dlib_config "C:\Program #
# Files (x86)\IAR Systems\Embedded Workbench 5.0 #
# Evaluation\ARM\INC\DLib_Config_Full.h" -I #
# F:\Diplomovka\IARprojects\Diplomovka\25.4.2009\getting-s #
# tarted-project-at91sam7x-ek-iar\getting-started-project- #
# at91sam7x-ek\at91sam7x-ek\getting-started-project\ewp\.. #
# \..\..\at91lib/peripherals\ -I #
# F:\Diplomovka\IARprojects\Diplomovka\25.4.2009\getting-s #
# tarted-project-at91sam7x-ek-iar\getting-started-project- #
# at91sam7x-ek\at91sam7x-ek\getting-started-project\ewp\.. #
# \..\..\at91lib\ -I F:\Diplomovka\IARprojects\Diplomovka\ #
# 25.4.2009\getting-started-project-at91sam7x-ek-iar\getti #
# ng-started-project-at91sam7x-ek\at91sam7x-ek\getting-sta #
# rted-project\ewp\..\..\..\at91lib\memories\sdmmc\ -I #
# F:\Diplomovka\IARprojects\Diplomovka\25.4.2009\getting-s #
# tarted-project-at91sam7x-ek-iar\getting-started-project- #
# at91sam7x-ek\at91sam7x-ek\getting-started-project\ewp\.. #
# \..\..\at91lib/components\ -I #
# F:\Diplomovka\IARprojects\Diplomovka\25.4.2009\getting-s #
# tarted-project-at91sam7x-ek-iar\getting-started-project- #
# at91sam7x-ek\at91sam7x-ek\getting-started-project\ewp\.. #
# \..\..\at91lib/boards/at91sam7x-ek\ -I #
# F:\Diplomovka\IARprojects\Diplomovka\25.4.2009\getting-s #
# tarted-project-at91sam7x-ek-iar\getting-started-project- #
# at91sam7x-ek\at91sam7x-ek\getting-started-project\ewp\.. #
# \..\..\external_libs/crc\ -I "C:\Program Files #
# (x86)\IAR Systems\Embedded Workbench 5.0 #
# Evaluation\ARM\INC\" --interwork --cpu_mode arm -Oh #
# List file = F:\Diplomovka\IARprojects\Diplomovka\25.4.2009\getting-s #
# tarted-project-at91sam7x-ek-iar\getting-started-project- #
# at91sam7x-ek\at91sam7x-ek\getting-started-project\ewp\at #
# 91sam7x256_flash\List\crc7.lst #
# Object file = F:\Diplomovka\IARprojects\Diplomovka\25.4.2009\getting-s #
# tarted-project-at91sam7x-ek-iar\getting-started-project- #
# at91sam7x-ek\at91sam7x-ek\getting-started-project\ewp\at #
# 91sam7x256_flash\Obj\crc7.o #
# #
# #
###############################################################################
F:\Diplomovka\IARprojects\Diplomovka\25.4.2009\getting-started-project-at91sam7x-ek-iar\getting-started-project-at91sam7x-ek\external_libs\crc\crc7.c
1 /*
2 * crc7.c
3 *
4 * This source code is licensed under the GNU General Public License,
5 * Version 2. See the file COPYING for more details.
6 */
7
8 //#include <linux/types.h>
9 //#include <linux/module.h>
10 //#include <linux/crc7.h>
11 #include "crc7.h"
\ In section .text, align 4, keep-with-next
\ static __??Code32?? __code __interwork unsigned char crc7_byte(unsigned char, unsigned char)
\ crc7_byte:
\ 00000000 800021E0 EOR R0,R1,R0, LSL #+1
\ 00000004 04109FE5 LDR R1,??crc7_byte_0 ;; crc7_syndrome_table
\ 00000008 0100D0E7 LDRB R0,[R0, +R1]
\ 0000000C 1EFF2FE1 BX LR ;; return
\ ??crc7_byte_0:
\ 00000010 ........ DC32 crc7_syndrome_table
12
13
14 /* Table for CRC-7 (polynomial x^7 + x^3 + 1) */
\ In section .rodata, align 4
15 const u8 crc7_syndrome_table[256] = {
\ crc7_syndrome_table:
\ 00000000 0009121B242D DC8 0, 9, 18, 27, 36, 45, 54, 63, 72, 65, 90, 83, 108, 101, 126, 119
\ 363F48415A53
\ 6C657E77
\ 00000010 19100B023D34 DC8 25, 16, 11, 2, 61, 52, 47, 38, 81, 88, 67, 74, 117, 124, 103, 110
\ 2F265158434A
\ 757C676E
\ 00000020 323B2029161F DC8 50, 59, 32, 41, 22, 31, 4, 13, 122, 115, 104, 97, 94, 87, 76, 69
\ 040D7A736861
\ 5E574C45
\ 00000030 2B2239300F06 DC8 43, 34, 57, 48, 15, 6, 29, 20, 99, 106, 113, 120, 71, 78, 85, 92
\ 1D14636A7178
\ 474E555C
\ 00000040 646D767F4049 DC8 100, 109, 118, 127, 64, 73, 82, 91, 44, 37, 62, 55, 8, 1, 26, 19
\ 525B2C253E37
\ 08011A13
\ 00000050 7D746F665950 DC8 125, 116, 111, 102, 89, 80, 75, 66, 53, 60, 39, 46, 17, 24, 3, 10
\ 4B42353C272E
\ 1118030A
\ 00000060 565F444D727B DC8 86, 95, 68, 77, 114, 123, 96, 105, 30, 23, 12, 5, 58, 51, 40, 33
\ 60691E170C05
\ 3A332821
\ 00000070 4F465D546B62 DC8 79, 70, 93, 84, 107, 98, 121, 112, 7, 14, 21, 28, 35, 42, 49, 56
\ 7970070E151C
\ 232A3138
\ 00000080 4148535A656C DC8 65, 72, 83, 90, 101, 108, 119, 126, 9, 0, 27, 18, 45, 36, 63, 54
\ 777E09001B12
\ 2D243F36
\ 00000090 58514A437C75 DC8 88, 81, 74, 67, 124, 117, 110, 103, 16, 25, 2, 11, 52, 61, 38, 47
\ 6E671019020B
\ 343D262F
\ 000000A0 737A6168575E DC8 115, 122, 97, 104, 87, 94, 69, 76, 59, 50, 41, 32, 31, 22, 13, 4
\ 454C3B322920
\ 1F160D04
\ 000000B0 6A6378714E47 DC8 106, 99, 120, 113, 78, 71, 92, 85, 34, 43, 48, 57, 6, 15, 20, 29
\ 5C55222B3039
\ 060F141D
\ 000000C0 252C373E0108 DC8 37, 44, 55, 62, 1, 8, 19, 26, 109, 100, 127, 118, 73, 64, 91, 82
\ 131A6D647F76
\ 49405B52
\ 000000D0 3C352E271811 DC8 60, 53, 46, 39, 24, 17, 10, 3, 116, 125, 102, 111, 80, 89, 66, 75
\ 0A03747D666F
\ 5059424B
\ 000000E0 171E050C333A DC8 23, 30, 5, 12, 51, 58, 33, 40, 95, 86, 77, 68, 123, 114, 105, 96
\ 21285F564D44
\ 7B726960
\ 000000F0 0E071C152A23 DC8 14, 7, 28, 21, 42, 35, 56, 49, 70, 79, 84, 93, 98, 107, 112, 121
\ 3831464F545D
\ 626B7079
16 0x00, 0x09, 0x12, 0x1b, 0x24, 0x2d, 0x36, 0x3f,
17 0x48, 0x41, 0x5a, 0x53, 0x6c, 0x65, 0x7e, 0x77,
18 0x19, 0x10, 0x0b, 0x02, 0x3d, 0x34, 0x2f, 0x26,
19 0x51, 0x58, 0x43, 0x4a, 0x75, 0x7c, 0x67, 0x6e,
20 0x32, 0x3b, 0x20, 0x29, 0x16, 0x1f, 0x04, 0x0d,
21 0x7a, 0x73, 0x68, 0x61, 0x5e, 0x57, 0x4c, 0x45,
22 0x2b, 0x22, 0x39, 0x30, 0x0f, 0x06, 0x1d, 0x14,
23 0x63, 0x6a, 0x71, 0x78, 0x47, 0x4e, 0x55, 0x5c,
24 0x64, 0x6d, 0x76, 0x7f, 0x40, 0x49, 0x52, 0x5b,
25 0x2c, 0x25, 0x3e, 0x37, 0x08, 0x01, 0x1a, 0x13,
26 0x7d, 0x74, 0x6f, 0x66, 0x59, 0x50, 0x4b, 0x42,
27 0x35, 0x3c, 0x27, 0x2e, 0x11, 0x18, 0x03, 0x0a,
28 0x56, 0x5f, 0x44, 0x4d, 0x72, 0x7b, 0x60, 0x69,
29 0x1e, 0x17, 0x0c, 0x05, 0x3a, 0x33, 0x28, 0x21,
30 0x4f, 0x46, 0x5d, 0x54, 0x6b, 0x62, 0x79, 0x70,
31 0x07, 0x0e, 0x15, 0x1c, 0x23, 0x2a, 0x31, 0x38,
32 0x41, 0x48, 0x53, 0x5a, 0x65, 0x6c, 0x77, 0x7e,
33 0x09, 0x00, 0x1b, 0x12, 0x2d, 0x24, 0x3f, 0x36,
34 0x58, 0x51, 0x4a, 0x43, 0x7c, 0x75, 0x6e, 0x67,
35 0x10, 0x19, 0x02, 0x0b, 0x34, 0x3d, 0x26, 0x2f,
36 0x73, 0x7a, 0x61, 0x68, 0x57, 0x5e, 0x45, 0x4c,
37 0x3b, 0x32, 0x29, 0x20, 0x1f, 0x16, 0x0d, 0x04,
38 0x6a, 0x63, 0x78, 0x71, 0x4e, 0x47, 0x5c, 0x55,
39 0x22, 0x2b, 0x30, 0x39, 0x06, 0x0f, 0x14, 0x1d,
40 0x25, 0x2c, 0x37, 0x3e, 0x01, 0x08, 0x13, 0x1a,
41 0x6d, 0x64, 0x7f, 0x76, 0x49, 0x40, 0x5b, 0x52,
42 0x3c, 0x35, 0x2e, 0x27, 0x18, 0x11, 0x0a, 0x03,
43 0x74, 0x7d, 0x66, 0x6f, 0x50, 0x59, 0x42, 0x4b,
44 0x17, 0x1e, 0x05, 0x0c, 0x33, 0x3a, 0x21, 0x28,
45 0x5f, 0x56, 0x4d, 0x44, 0x7b, 0x72, 0x69, 0x60,
46 0x0e, 0x07, 0x1c, 0x15, 0x2a, 0x23, 0x38, 0x31,
47 0x46, 0x4f, 0x54, 0x5d, 0x62, 0x6b, 0x70, 0x79
48 };
49 //EXPORT_SYMBOL(crc7_syndrome_table);
50
51 /**
52 * crc7 - update the CRC7 for the data buffer
53 * @crc: previous CRC7 value
54 * @buffer: data pointer
55 * @len: number of bytes in the buffer
56 * Context: any
57 *
58 * Returns the updated CRC7 value.
59 */
\ In section .text, align 4, keep-with-next
60 u8 crc7(u8 crc, const u8 *buffer, size_t len)
61 {
\ crc7:
\ 00000000 38402DE9 PUSH {R3-R5,LR}
\ 00000004 0150A0E1 MOV R5,R1
\ 00000008 0240B0E1 MOVS R4,R2
\ 0000000C 0400000A BEQ ??crc7_0
\ ??crc7_1:
\ 00000010 014044E2 SUB R4,R4,#+1
62 while (len--)
63 crc = crc7_byte(crc, *buffer++);
\ 00000014 0110D5E4 LDRB R1,[R5], #+1
\ 00000018 ........ BL crc7_byte
\ 0000001C 000054E3 CMP R4,#+0
\ 00000020 FAFFFF1A BNE ??crc7_1
64 return crc;
\ ??crc7_0:
\ 00000024 3240BDE8 POP {R1,R4,R5,LR}
\ 00000028 1EFF2FE1 BX LR ;; return
65 }
66 //EXPORT_SYMBOL(crc7);
67
68 //MODULE_DESCRIPTION("CRC7 calculations");
69 //MODULE_LICENSE("GPL");
70
Maximum stack usage in bytes:
Function .cstack
-------- -------
crc7 0
crc7_byte 0
Section sizes:
Function/Label Bytes
-------------- -----
crc7_byte 20
crc7_syndrome_table 256
crc7 44
256 bytes in section .rodata
64 bytes in section .text
64 bytes of CODE memory
256 bytes of CONST memory
Errors: none
Warnings: none
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -