diff --git a/uart01/uart01.c b/uart01/uart01.c index a6d5aaf..0b238b4 100644 --- a/uart01/uart01.c +++ b/uart01/uart01.c @@ -72,3 +72,16 @@ int notmain ( void ) } //------------------------------------------------------------------------- //------------------------------------------------------------------------- + + +//------------------------------------------------------------------------- +// +// Copyright (c) 2012 David Welch dwelch@dwelch.com +// +// Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +// +//------------------------------------------------------------------------- diff --git a/uart01/vectors.s b/uart01/vectors.s index beb9cf5..024dd66 100644 --- a/uart01/vectors.s +++ b/uart01/vectors.s @@ -18,3 +18,17 @@ GET32: .globl dummy dummy: bx lr + + + +;@------------------------------------------------------------------------- +;@ +;@ Copyright (c) 2012 David Welch dwelch@dwelch.com +;@ +;@ Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: +;@ +;@ The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. +;@ +;@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +;@ +;@------------------------------------------------------------------------- diff --git a/uart02/uart02.c b/uart02/uart02.c index 7f8cfc6..bd2e64b 100644 --- a/uart02/uart02.c +++ b/uart02/uart02.c @@ -115,3 +115,16 @@ int notmain ( unsigned int earlypc ) } //------------------------------------------------------------------------- //------------------------------------------------------------------------- + + +//------------------------------------------------------------------------- +// +// Copyright (c) 2012 David Welch dwelch@dwelch.com +// +// Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +// +//------------------------------------------------------------------------- diff --git a/uart02/uart02.clang.bc b/uart02/uart02.clang.bc new file mode 100644 index 0000000..104929f Binary files /dev/null and b/uart02/uart02.clang.bc differ diff --git a/uart02/uart02.clang.bin b/uart02/uart02.clang.bin new file mode 100755 index 0000000..323c47a Binary files /dev/null and b/uart02/uart02.clang.bin differ diff --git a/uart02/uart02.clang.hex b/uart02/uart02.clang.hex new file mode 100644 index 0000000..a73e89a --- /dev/null +++ b/uart02/uart02.clang.hex @@ -0,0 +1,68 @@ +:1080000002D9A0E30F00A0E1900000EBFEFFFFEA21 +:10801000001080E51EFF2FE1000090E51EFF2FE11C +:108020001EFF2FE110402DE90040A0E118009FE560 +:10803000F8FFFFEB200010E3FBFFFF0A0C009FE5B9 +:108040000410A0E1F1FFFFEB1080BDE854502120A7 +:108050004050212070402DE90040A0E13700A0E30E +:10806000245E80E0246EA0E188019FE5E9FFFFEB3C +:10807000200010E3FBFFFF0A7C019FE5301086E340 +:108080000A0254E30510A021E0FFFFEB0F00A0E37C +:10809000246C00E0375086E258019FE5DDFFFFEBDE +:1080A000200010E3FBFFFF0A4C019FE5301086E340 +:1080B000090056E30510A081D4FFFFEB0F00A0E3F9 +:1080C000246A00E0375086E228019FE5D1FFFFEBEC +:1080D000200010E3FBFFFF0A1C019FE5301086E340 +:1080E000090056E30510A081C8FFFFEB0F00A0E3D5 +:1080F000246800E0375086E2F8009FE5C5FFFFEBFB +:10810000200010E3FBFFFF0AEC009FE5301086E340 +:10811000090056E30510A081BCFFFFEB0F00A0E3B0 +:10812000246600E0375086E2C8009FE5B9FFFFEB08 +:10813000200010E3FBFFFF0ABC009FE5301086E340 +:10814000090056E30510A081B0FFFFEB0F00A0E38C +:10815000246400E0375086E298009FE5ADFFFFEB16 +:10816000200010E3FBFFFF0A8C009FE5301086E340 +:10817000090056E30510A081A4FFFFEB0F00A0E368 +:10818000246200E0375086E268009FE5A1FFFFEB24 +:10819000200010E3FBFFFF0A5C009FE5301086E340 +:1081A000090056E30510A08198FFFFEB0F5004E291 +:1081B000374085E23C009FE596FFFFEB200010E38F +:1081C000FBFFFF0A30009FE5301085E3090055E30F +:1081D0000410A0818DFFFFEB18009FE58DFFFFEBE2 +:1081E000200010E3FBFFFF0A0C009FE52010A0E336 +:1081F00086FFFFEB7080BDE85450212040502120C5 +:1082000004E02DE592FFFFEB38009FE581FFFFEBD7 +:10821000200010E3FBFFFF0A2C009FE50D10A0E3F8 +:108220007AFFFFEB1C009FE57AFFFFEB200010E3D5 +:10823000FBFFFF0A10009FE50A10A0E373FFFFEBAE +:1082400004E09DE41EFF2FE15450212040502120E6 +:1082500070402DE90040A0E188019FE50110A0E3F6 +:108260006AFFFFEB80619FE50010A0E30050A0E3F0 +:108270000600A0E165FFFFEB70019FE50010A0E3A1 +:1082800062FFFFEB68019FE50310A0E35FFFFFEBD8 +:1082900060019FE50010A0E35CFFFFEB0600A0E19A +:1082A0000010A0E359FFFFEB4C019FE5C610A0E3CF +:1082B00056FFFFEB44019FE50E10A0E3011C81E394 +:1082C00052FFFFEB38619FE50600A0E151FFFFEB95 +:1082D0003F0AC0E3121A80E30600A0E14BFFFFEB68 +:1082E00020019FE50010A0E348FFFFEB0500A0E19F +:1082F0004AFFFFEB015085E2960055E3FAFFFF1AB3 +:1083000004019FE50319A0E340FFFFEB0050A0E349 +:108310000500A0E141FFFFEB015085E2960055E327 +:10832000FAFFFF1AE0009FE50010A0E337FFFFEB24 +:10833000B8009FE50310A0E334FFFFEBCC009FE5FE +:1083400043FFFFEBC8009FE532FFFFEB200010E387 +:10835000FBFFFF0ABC009FE50D10A0E32BFFFFEB26 +:10836000AC009FE52BFFFFEB200010E3FBFFFF0AB3 +:10837000A0009FE50A10A0E324FFFFEB0400A0E1AA +:1083800033FFFFEB88009FE522FFFFEB200010E3A7 +:10839000FBFFFF0A7C009FE50D10A0E31BFFFFEB36 +:1083A0006C009FE51BFFFFEB200010E3FBFFFF0AC3 +:1083B00060009FE50A10A0E3040000EA54409FE536 +:1083C0000400A0E113FFFFEB0010A0E10400A0E116 +:1083D0000EFFFFEB38009FE50EFFFFEB010010E3FF +:1083E000FBFFFF0AF4FFFFEA045021204450212044 +:1083F000605021204C5021205050212048502120F5 +:108400006850212004002020940020209800202083 +:0C84100078563412545021204050212096 +:040000030000800079 +:00000001FF diff --git a/uart02/uart02.clang.opt.bc b/uart02/uart02.clang.opt.bc new file mode 100644 index 0000000..726240a Binary files /dev/null and b/uart02/uart02.clang.opt.bc differ diff --git a/uart02/uart02.clang.opt.elf b/uart02/uart02.clang.opt.elf new file mode 100755 index 0000000..81c4073 Binary files /dev/null and b/uart02/uart02.clang.opt.elf differ diff --git a/uart02/uart02.clang.opt.list b/uart02/uart02.clang.opt.list new file mode 100644 index 0000000..8b8acbb --- /dev/null +++ b/uart02/uart02.clang.opt.list @@ -0,0 +1,300 @@ + +uart02.clang.opt.elf: file format elf32-littlearm + + +Disassembly of section .text: + +00008000 <_start>: + 8000: e3a0d902 mov sp, #32768 ; 0x8000 + 8004: e1a0000f mov r0, pc + 8008: eb000090 bl 8250 + +0000800c : + 800c: eafffffe b 800c + +00008010 : + 8010: e5801000 str r1, [r0] + 8014: e12fff1e bx lr + +00008018 : + 8018: e5900000 ldr r0, [r0] + 801c: e12fff1e bx lr + +00008020 : + 8020: e12fff1e bx lr + +00008024 : + 8024: e92d4010 push {r4, lr} + 8028: e1a04000 mov r4, r0 + 802c: e59f0018 ldr r0, [pc, #24] ; 804c + 8030: ebfffff8 bl 8018 + 8034: e3100020 tst r0, #32 + 8038: 0afffffb beq 802c + 803c: e59f000c ldr r0, [pc, #12] ; 8050 + 8040: e1a01004 mov r1, r4 + 8044: ebfffff1 bl 8010 + 8048: e8bd8010 pop {r4, pc} + 804c: 20215054 eorcs r5, r1, r4, asr r0 + 8050: 20215040 eorcs r5, r1, r0, asr #32 + +00008054 : + 8054: e92d4070 push {r4, r5, r6, lr} + 8058: e1a04000 mov r4, r0 + 805c: e3a00037 mov r0, #55 ; 0x37 + 8060: e0805e24 add r5, r0, r4, lsr #28 + 8064: e1a06e24 lsr r6, r4, #28 + 8068: e59f0188 ldr r0, [pc, #392] ; 81f8 + 806c: ebffffe9 bl 8018 + 8070: e3100020 tst r0, #32 + 8074: 0afffffb beq 8068 + 8078: e59f017c ldr r0, [pc, #380] ; 81fc + 807c: e3861030 orr r1, r6, #48 ; 0x30 + 8080: e354020a cmp r4, #-1610612736 ; 0xa0000000 + 8084: 21a01005 movcs r1, r5 + 8088: ebffffe0 bl 8010 + 808c: e3a0000f mov r0, #15 + 8090: e0006c24 and r6, r0, r4, lsr #24 + 8094: e2865037 add r5, r6, #55 ; 0x37 + 8098: e59f0158 ldr r0, [pc, #344] ; 81f8 + 809c: ebffffdd bl 8018 + 80a0: e3100020 tst r0, #32 + 80a4: 0afffffb beq 8098 + 80a8: e59f014c ldr r0, [pc, #332] ; 81fc + 80ac: e3861030 orr r1, r6, #48 ; 0x30 + 80b0: e3560009 cmp r6, #9 + 80b4: 81a01005 movhi r1, r5 + 80b8: ebffffd4 bl 8010 + 80bc: e3a0000f mov r0, #15 + 80c0: e0006a24 and r6, r0, r4, lsr #20 + 80c4: e2865037 add r5, r6, #55 ; 0x37 + 80c8: e59f0128 ldr r0, [pc, #296] ; 81f8 + 80cc: ebffffd1 bl 8018 + 80d0: e3100020 tst r0, #32 + 80d4: 0afffffb beq 80c8 + 80d8: e59f011c ldr r0, [pc, #284] ; 81fc + 80dc: e3861030 orr r1, r6, #48 ; 0x30 + 80e0: e3560009 cmp r6, #9 + 80e4: 81a01005 movhi r1, r5 + 80e8: ebffffc8 bl 8010 + 80ec: e3a0000f mov r0, #15 + 80f0: e0006824 and r6, r0, r4, lsr #16 + 80f4: e2865037 add r5, r6, #55 ; 0x37 + 80f8: e59f00f8 ldr r0, [pc, #248] ; 81f8 + 80fc: ebffffc5 bl 8018 + 8100: e3100020 tst r0, #32 + 8104: 0afffffb beq 80f8 + 8108: e59f00ec ldr r0, [pc, #236] ; 81fc + 810c: e3861030 orr r1, r6, #48 ; 0x30 + 8110: e3560009 cmp r6, #9 + 8114: 81a01005 movhi r1, r5 + 8118: ebffffbc bl 8010 + 811c: e3a0000f mov r0, #15 + 8120: e0006624 and r6, r0, r4, lsr #12 + 8124: e2865037 add r5, r6, #55 ; 0x37 + 8128: e59f00c8 ldr r0, [pc, #200] ; 81f8 + 812c: ebffffb9 bl 8018 + 8130: e3100020 tst r0, #32 + 8134: 0afffffb beq 8128 + 8138: e59f00bc ldr r0, [pc, #188] ; 81fc + 813c: e3861030 orr r1, r6, #48 ; 0x30 + 8140: e3560009 cmp r6, #9 + 8144: 81a01005 movhi r1, r5 + 8148: ebffffb0 bl 8010 + 814c: e3a0000f mov r0, #15 + 8150: e0006424 and r6, r0, r4, lsr #8 + 8154: e2865037 add r5, r6, #55 ; 0x37 + 8158: e59f0098 ldr r0, [pc, #152] ; 81f8 + 815c: ebffffad bl 8018 + 8160: e3100020 tst r0, #32 + 8164: 0afffffb beq 8158 + 8168: e59f008c ldr r0, [pc, #140] ; 81fc + 816c: e3861030 orr r1, r6, #48 ; 0x30 + 8170: e3560009 cmp r6, #9 + 8174: 81a01005 movhi r1, r5 + 8178: ebffffa4 bl 8010 + 817c: e3a0000f mov r0, #15 + 8180: e0006224 and r6, r0, r4, lsr #4 + 8184: e2865037 add r5, r6, #55 ; 0x37 + 8188: e59f0068 ldr r0, [pc, #104] ; 81f8 + 818c: ebffffa1 bl 8018 + 8190: e3100020 tst r0, #32 + 8194: 0afffffb beq 8188 + 8198: e59f005c ldr r0, [pc, #92] ; 81fc + 819c: e3861030 orr r1, r6, #48 ; 0x30 + 81a0: e3560009 cmp r6, #9 + 81a4: 81a01005 movhi r1, r5 + 81a8: ebffff98 bl 8010 + 81ac: e204500f and r5, r4, #15 + 81b0: e2854037 add r4, r5, #55 ; 0x37 + 81b4: e59f003c ldr r0, [pc, #60] ; 81f8 + 81b8: ebffff96 bl 8018 + 81bc: e3100020 tst r0, #32 + 81c0: 0afffffb beq 81b4 + 81c4: e59f0030 ldr r0, [pc, #48] ; 81fc + 81c8: e3851030 orr r1, r5, #48 ; 0x30 + 81cc: e3550009 cmp r5, #9 + 81d0: 81a01004 movhi r1, r4 + 81d4: ebffff8d bl 8010 + 81d8: e59f0018 ldr r0, [pc, #24] ; 81f8 + 81dc: ebffff8d bl 8018 + 81e0: e3100020 tst r0, #32 + 81e4: 0afffffb beq 81d8 + 81e8: e59f000c ldr r0, [pc, #12] ; 81fc + 81ec: e3a01020 mov r1, #32 + 81f0: ebffff86 bl 8010 + 81f4: e8bd8070 pop {r4, r5, r6, pc} + 81f8: 20215054 eorcs r5, r1, r4, asr r0 + 81fc: 20215040 eorcs r5, r1, r0, asr #32 + +00008200 : + 8200: e52de004 push {lr} ; (str lr, [sp, #-4]!) + 8204: ebffff92 bl 8054 + 8208: e59f0038 ldr r0, [pc, #56] ; 8248 + 820c: ebffff81 bl 8018 + 8210: e3100020 tst r0, #32 + 8214: 0afffffb beq 8208 + 8218: e59f002c ldr r0, [pc, #44] ; 824c + 821c: e3a0100d mov r1, #13 + 8220: ebffff7a bl 8010 + 8224: e59f001c ldr r0, [pc, #28] ; 8248 + 8228: ebffff7a bl 8018 + 822c: e3100020 tst r0, #32 + 8230: 0afffffb beq 8224 + 8234: e59f0010 ldr r0, [pc, #16] ; 824c + 8238: e3a0100a mov r1, #10 + 823c: ebffff73 bl 8010 + 8240: e49de004 pop {lr} ; (ldr lr, [sp], #4) + 8244: e12fff1e bx lr + 8248: 20215054 eorcs r5, r1, r4, asr r0 + 824c: 20215040 eorcs r5, r1, r0, asr #32 + +00008250 : + 8250: e92d4070 push {r4, r5, r6, lr} + 8254: e1a04000 mov r4, r0 + 8258: e59f0188 ldr r0, [pc, #392] ; 83e8 + 825c: e3a01001 mov r1, #1 + 8260: ebffff6a bl 8010 + 8264: e59f6180 ldr r6, [pc, #384] ; 83ec + 8268: e3a01000 mov r1, #0 + 826c: e3a05000 mov r5, #0 + 8270: e1a00006 mov r0, r6 + 8274: ebffff65 bl 8010 + 8278: e59f0170 ldr r0, [pc, #368] ; 83f0 + 827c: e3a01000 mov r1, #0 + 8280: ebffff62 bl 8010 + 8284: e59f0168 ldr r0, [pc, #360] ; 83f4 + 8288: e3a01003 mov r1, #3 + 828c: ebffff5f bl 8010 + 8290: e59f0160 ldr r0, [pc, #352] ; 83f8 + 8294: e3a01000 mov r1, #0 + 8298: ebffff5c bl 8010 + 829c: e1a00006 mov r0, r6 + 82a0: e3a01000 mov r1, #0 + 82a4: ebffff59 bl 8010 + 82a8: e59f014c ldr r0, [pc, #332] ; 83fc + 82ac: e3a010c6 mov r1, #198 ; 0xc6 + 82b0: ebffff56 bl 8010 + 82b4: e59f0144 ldr r0, [pc, #324] ; 8400 + 82b8: e3a0100e mov r1, #14 + 82bc: e3811c01 orr r1, r1, #256 ; 0x100 + 82c0: ebffff52 bl 8010 + 82c4: e59f6138 ldr r6, [pc, #312] ; 8404 + 82c8: e1a00006 mov r0, r6 + 82cc: ebffff51 bl 8018 + 82d0: e3c00a3f bic r0, r0, #258048 ; 0x3f000 + 82d4: e3801a12 orr r1, r0, #73728 ; 0x12000 + 82d8: e1a00006 mov r0, r6 + 82dc: ebffff4b bl 8010 + 82e0: e59f0120 ldr r0, [pc, #288] ; 8408 + 82e4: e3a01000 mov r1, #0 + 82e8: ebffff48 bl 8010 + 82ec: e1a00005 mov r0, r5 + 82f0: ebffff4a bl 8020 + 82f4: e2855001 add r5, r5, #1 + 82f8: e3550096 cmp r5, #150 ; 0x96 + 82fc: 1afffffa bne 82ec + 8300: e59f0104 ldr r0, [pc, #260] ; 840c + 8304: e3a01903 mov r1, #49152 ; 0xc000 + 8308: ebffff40 bl 8010 + 830c: e3a05000 mov r5, #0 + 8310: e1a00005 mov r0, r5 + 8314: ebffff41 bl 8020 + 8318: e2855001 add r5, r5, #1 + 831c: e3550096 cmp r5, #150 ; 0x96 + 8320: 1afffffa bne 8310 + 8324: e59f00e0 ldr r0, [pc, #224] ; 840c + 8328: e3a01000 mov r1, #0 + 832c: ebffff37 bl 8010 + 8330: e59f00b8 ldr r0, [pc, #184] ; 83f0 + 8334: e3a01003 mov r1, #3 + 8338: ebffff34 bl 8010 + 833c: e59f00cc ldr r0, [pc, #204] ; 8410 + 8340: ebffff43 bl 8054 + 8344: e59f00c8 ldr r0, [pc, #200] ; 8414 + 8348: ebffff32 bl 8018 + 834c: e3100020 tst r0, #32 + 8350: 0afffffb beq 8344 + 8354: e59f00bc ldr r0, [pc, #188] ; 8418 + 8358: e3a0100d mov r1, #13 + 835c: ebffff2b bl 8010 + 8360: e59f00ac ldr r0, [pc, #172] ; 8414 + 8364: ebffff2b bl 8018 + 8368: e3100020 tst r0, #32 + 836c: 0afffffb beq 8360 + 8370: e59f00a0 ldr r0, [pc, #160] ; 8418 + 8374: e3a0100a mov r1, #10 + 8378: ebffff24 bl 8010 + 837c: e1a00004 mov r0, r4 + 8380: ebffff33 bl 8054 + 8384: e59f0088 ldr r0, [pc, #136] ; 8414 + 8388: ebffff22 bl 8018 + 838c: e3100020 tst r0, #32 + 8390: 0afffffb beq 8384 + 8394: e59f007c ldr r0, [pc, #124] ; 8418 + 8398: e3a0100d mov r1, #13 + 839c: ebffff1b bl 8010 + 83a0: e59f006c ldr r0, [pc, #108] ; 8414 + 83a4: ebffff1b bl 8018 + 83a8: e3100020 tst r0, #32 + 83ac: 0afffffb beq 83a0 + 83b0: e59f0060 ldr r0, [pc, #96] ; 8418 + 83b4: e3a0100a mov r1, #10 + 83b8: ea000004 b 83d0 + 83bc: e59f4054 ldr r4, [pc, #84] ; 8418 + 83c0: e1a00004 mov r0, r4 + 83c4: ebffff13 bl 8018 + 83c8: e1a01000 mov r1, r0 + 83cc: e1a00004 mov r0, r4 + 83d0: ebffff0e bl 8010 + 83d4: e59f0038 ldr r0, [pc, #56] ; 8414 + 83d8: ebffff0e bl 8018 + 83dc: e3100001 tst r0, #1 + 83e0: 0afffffb beq 83d4 + 83e4: eafffff4 b 83bc + 83e8: 20215004 eorcs r5, r1, r4 + 83ec: 20215044 eorcs r5, r1, r4, asr #32 + 83f0: 20215060 eorcs r5, r1, r0, rrx + 83f4: 2021504c eorcs r5, r1, ip, asr #32 + 83f8: 20215050 eorcs r5, r1, r0, asr r0 + 83fc: 20215048 eorcs r5, r1, r8, asr #32 + 8400: 20215068 eorcs r5, r1, r8, rrx + 8404: 20200004 eorcs r0, r0, r4 + 8408: 20200094 mlacs r0, r4, r0, r0 + 840c: 20200098 mlacs r0, r8, r0, r0 + 8410: 12345678 eorsne r5, r4, #120, 12 ; 0x7800000 + 8414: 20215054 eorcs r5, r1, r4, asr r0 + 8418: 20215040 eorcs r5, r1, r0, asr #32 + +Disassembly of section .ARM.attributes: + +00000000 <.ARM.attributes>: + 0: 00002141 andeq r2, r0, r1, asr #2 + 4: 61656100 cmnvs r5, r0, lsl #2 + 8: 01006962 tsteq r0, r2, ror #18 + c: 00000017 andeq r0, r0, r7, lsl r0 + 10: 01080206 tsteq r8, r6, lsl #4 + 14: 020a0109 andeq r0, sl, #1073741826 ; 0x40000002 + 18: 01150114 tsteq r5, r4, lsl r1 + 1c: 01180317 tsteq r8, r7, lsl r3 + 20: Address 0x00000020 is out of bounds. + diff --git a/uart02/uart02.clang.opt.o b/uart02/uart02.clang.opt.o new file mode 100644 index 0000000..f9ce6a2 Binary files /dev/null and b/uart02/uart02.clang.opt.o differ diff --git a/uart02/uart02.clang.opt.s b/uart02/uart02.clang.opt.s new file mode 100644 index 0000000..4d3c37b --- /dev/null +++ b/uart02/uart02.clang.opt.s @@ -0,0 +1,386 @@ + .syntax unified + .eabi_attribute 10, 2 + .fpu vfpv2 + .eabi_attribute 20, 1 + .eabi_attribute 21, 1 + .eabi_attribute 23, 3 + .eabi_attribute 24, 1 + .eabi_attribute 25, 1 + .file "uart02.clang.opt.bc" + .text + .globl uart_putc + .align 2 + .type uart_putc,%function +uart_putc: @ @uart_putc +@ BB#0: @ %entry + push {r4, lr} + mov r4, r0 +.LBB0_1: @ %while.body + @ =>This Inner Loop Header: Depth=1 + ldr r0, .LCPI0_0 + bl GET32 + tst r0, #32 + beq .LBB0_1 +@ BB#2: @ %while.end + ldr r0, .LCPI0_1 + mov r1, r4 + bl PUT32 + pop {r4, pc} + .align 2 +@ BB#3: +.LCPI0_0: + .long 539054164 @ 0x20215054 +.LCPI0_1: + .long 539054144 @ 0x20215040 +.Ltmp0: + .size uart_putc, .Ltmp0-uart_putc + + .globl hexstrings + .align 2 + .type hexstrings,%function +hexstrings: @ @hexstrings +@ BB#0: @ %entry + push {r4, r5, r6, lr} + mov r4, r0 + mov r0, #55 + add r5, r0, r4, lsr #28 + lsr r6, r4, #28 +.LBB1_1: @ %while.body.i + @ =>This Inner Loop Header: Depth=1 + ldr r0, .LCPI1_0 + bl GET32 + tst r0, #32 + beq .LBB1_1 +@ BB#2: @ %uart_putc.exit + ldr r0, .LCPI1_1 + orr r1, r6, #48 + cmp r4, #-1610612736 + movhs r1, r5 + bl PUT32 + mov r0, #15 + and r6, r0, r4, lsr #24 + add r5, r6, #55 +.LBB1_3: @ %while.body.i.1 + @ =>This Inner Loop Header: Depth=1 + ldr r0, .LCPI1_0 + bl GET32 + tst r0, #32 + beq .LBB1_3 +@ BB#4: @ %uart_putc.exit.1 + ldr r0, .LCPI1_1 + orr r1, r6, #48 + cmp r6, #9 + movhi r1, r5 + bl PUT32 + mov r0, #15 + and r6, r0, r4, lsr #20 + add r5, r6, #55 +.LBB1_5: @ %while.body.i.2 + @ =>This Inner Loop Header: Depth=1 + ldr r0, .LCPI1_0 + bl GET32 + tst r0, #32 + beq .LBB1_5 +@ BB#6: @ %uart_putc.exit.2 + ldr r0, .LCPI1_1 + orr r1, r6, #48 + cmp r6, #9 + movhi r1, r5 + bl PUT32 + mov r0, #15 + and r6, r0, r4, lsr #16 + add r5, r6, #55 +.LBB1_7: @ %while.body.i.3 + @ =>This Inner Loop Header: Depth=1 + ldr r0, .LCPI1_0 + bl GET32 + tst r0, #32 + beq .LBB1_7 +@ BB#8: @ %uart_putc.exit.3 + ldr r0, .LCPI1_1 + orr r1, r6, #48 + cmp r6, #9 + movhi r1, r5 + bl PUT32 + mov r0, #15 + and r6, r0, r4, lsr #12 + add r5, r6, #55 +.LBB1_9: @ %while.body.i.4 + @ =>This Inner Loop Header: Depth=1 + ldr r0, .LCPI1_0 + bl GET32 + tst r0, #32 + beq .LBB1_9 +@ BB#10: @ %uart_putc.exit.4 + ldr r0, .LCPI1_1 + orr r1, r6, #48 + cmp r6, #9 + movhi r1, r5 + bl PUT32 + mov r0, #15 + and r6, r0, r4, lsr #8 + add r5, r6, #55 +.LBB1_11: @ %while.body.i.5 + @ =>This Inner Loop Header: Depth=1 + ldr r0, .LCPI1_0 + bl GET32 + tst r0, #32 + beq .LBB1_11 +@ BB#12: @ %uart_putc.exit.5 + ldr r0, .LCPI1_1 + orr r1, r6, #48 + cmp r6, #9 + movhi r1, r5 + bl PUT32 + mov r0, #15 + and r6, r0, r4, lsr #4 + add r5, r6, #55 +.LBB1_13: @ %while.body.i.6 + @ =>This Inner Loop Header: Depth=1 + ldr r0, .LCPI1_0 + bl GET32 + tst r0, #32 + beq .LBB1_13 +@ BB#14: @ %uart_putc.exit.6 + ldr r0, .LCPI1_1 + orr r1, r6, #48 + cmp r6, #9 + movhi r1, r5 + bl PUT32 + and r5, r4, #15 + add r4, r5, #55 +.LBB1_15: @ %while.body.i.7 + @ =>This Inner Loop Header: Depth=1 + ldr r0, .LCPI1_0 + bl GET32 + tst r0, #32 + beq .LBB1_15 +@ BB#16: @ %uart_putc.exit.7 + ldr r0, .LCPI1_1 + orr r1, r5, #48 + cmp r5, #9 + movhi r1, r4 + bl PUT32 +.LBB1_17: @ %while.body.i4 + @ =>This Inner Loop Header: Depth=1 + ldr r0, .LCPI1_0 + bl GET32 + tst r0, #32 + beq .LBB1_17 +@ BB#18: @ %uart_putc.exit5 + ldr r0, .LCPI1_1 + mov r1, #32 + bl PUT32 + pop {r4, r5, r6, pc} + .align 2 +@ BB#19: +.LCPI1_0: + .long 539054164 @ 0x20215054 +.LCPI1_1: + .long 539054144 @ 0x20215040 +.Ltmp1: + .size hexstrings, .Ltmp1-hexstrings + + .globl hexstring + .align 2 + .type hexstring,%function +hexstring: @ @hexstring +@ BB#0: @ %entry + push {lr} + bl hexstrings +.LBB2_1: @ %while.body.i + @ =>This Inner Loop Header: Depth=1 + ldr r0, .LCPI2_0 + bl GET32 + tst r0, #32 + beq .LBB2_1 +@ BB#2: @ %uart_putc.exit + ldr r0, .LCPI2_1 + mov r1, #13 + bl PUT32 +.LBB2_3: @ %while.body.i4 + @ =>This Inner Loop Header: Depth=1 + ldr r0, .LCPI2_0 + bl GET32 + tst r0, #32 + beq .LBB2_3 +@ BB#4: @ %uart_putc.exit5 + ldr r0, .LCPI2_1 + mov r1, #10 + bl PUT32 + pop {lr} + bx lr + .align 2 +@ BB#5: +.LCPI2_0: + .long 539054164 @ 0x20215054 +.LCPI2_1: + .long 539054144 @ 0x20215040 +.Ltmp2: + .size hexstring, .Ltmp2-hexstring + + .globl notmain + .align 2 + .type notmain,%function +notmain: @ @notmain +@ BB#0: @ %entry + push {r4, r5, r6, lr} + mov r4, r0 + ldr r0, .LCPI3_0 + mov r1, #1 + bl PUT32 + ldr r6, .LCPI3_1 + mov r1, #0 + mov r5, #0 + mov r0, r6 + bl PUT32 + ldr r0, .LCPI3_2 + mov r1, #0 + bl PUT32 + ldr r0, .LCPI3_3 + mov r1, #3 + bl PUT32 + ldr r0, .LCPI3_4 + mov r1, #0 + bl PUT32 + mov r0, r6 + mov r1, #0 + bl PUT32 + ldr r0, .LCPI3_5 + mov r1, #198 + bl PUT32 + ldr r0, .LCPI3_6 + mov r1, #14 + orr r1, r1, #256 + bl PUT32 + ldr r6, .LCPI3_7 + mov r0, r6 + bl GET32 + bic r0, r0, #258048 + orr r1, r0, #73728 + mov r0, r6 + bl PUT32 + ldr r0, .LCPI3_8 + mov r1, #0 + bl PUT32 +.LBB3_1: @ %for.body + @ =>This Inner Loop Header: Depth=1 + mov r0, r5 + bl dummy + add r5, r5, #1 + cmp r5, #150 + bne .LBB3_1 +@ BB#2: @ %for.end + ldr r0, .LCPI3_9 + mov r1, #49152 + bl PUT32 + mov r5, #0 +.LBB3_3: @ %for.body5 + @ =>This Inner Loop Header: Depth=1 + mov r0, r5 + bl dummy + add r5, r5, #1 + cmp r5, #150 + bne .LBB3_3 +@ BB#4: @ %for.end8 + ldr r0, .LCPI3_9 + mov r1, #0 + bl PUT32 + ldr r0, .LCPI3_2 + mov r1, #3 + bl PUT32 + ldr r0, .LCPI3_10 + bl hexstrings +.LBB3_5: @ %while.body.i.i + @ =>This Inner Loop Header: Depth=1 + ldr r0, .LCPI3_11 + bl GET32 + tst r0, #32 + beq .LBB3_5 +@ BB#6: @ %uart_putc.exit.i + ldr r0, .LCPI3_12 + mov r1, #13 + bl PUT32 +.LBB3_7: @ %while.body.i4.i + @ =>This Inner Loop Header: Depth=1 + ldr r0, .LCPI3_11 + bl GET32 + tst r0, #32 + beq .LBB3_7 +@ BB#8: @ %hexstring.exit + ldr r0, .LCPI3_12 + mov r1, #10 + bl PUT32 + mov r0, r4 + bl hexstrings +.LBB3_9: @ %while.body.i.i5 + @ =>This Inner Loop Header: Depth=1 + ldr r0, .LCPI3_11 + bl GET32 + tst r0, #32 + beq .LBB3_9 +@ BB#10: @ %uart_putc.exit.i6 + ldr r0, .LCPI3_12 + mov r1, #13 + bl PUT32 +.LBB3_11: @ %while.body.i4.i10 + @ =>This Inner Loop Header: Depth=1 + ldr r0, .LCPI3_11 + bl GET32 + tst r0, #32 + beq .LBB3_11 +@ BB#12: @ %hexstring.exit11 + ldr r0, .LCPI3_12 + mov r1, #10 + b .LBB3_14 +.LBB3_13: @ %while.end + @ in Loop: Header=BB3_14 Depth=1 + ldr r4, .LCPI3_12 + mov r0, r4 + bl GET32 + mov r1, r0 + mov r0, r4 +.LBB3_14: @ %hexstring.exit11 + @ =>This Loop Header: Depth=1 + @ Child Loop BB3_15 Depth 2 + bl PUT32 +.LBB3_15: @ %while.body10 + @ Parent Loop BB3_14 Depth=1 + @ => This Inner Loop Header: Depth=2 + ldr r0, .LCPI3_11 + bl GET32 + tst r0, #1 + beq .LBB3_15 + b .LBB3_13 + .align 2 +@ BB#16: +.LCPI3_0: + .long 539054084 @ 0x20215004 +.LCPI3_1: + .long 539054148 @ 0x20215044 +.LCPI3_2: + .long 539054176 @ 0x20215060 +.LCPI3_3: + .long 539054156 @ 0x2021504c +.LCPI3_4: + .long 539054160 @ 0x20215050 +.LCPI3_5: + .long 539054152 @ 0x20215048 +.LCPI3_6: + .long 539054184 @ 0x20215068 +.LCPI3_7: + .long 538968068 @ 0x20200004 +.LCPI3_8: + .long 538968212 @ 0x20200094 +.LCPI3_9: + .long 538968216 @ 0x20200098 +.LCPI3_10: + .long 305419896 @ 0x12345678 +.LCPI3_11: + .long 539054164 @ 0x20215054 +.LCPI3_12: + .long 539054144 @ 0x20215040 +.Ltmp3: + .size notmain, .Ltmp3-notmain + + diff --git a/uart02/uart02.hex b/uart02/uart02.hex new file mode 100644 index 0000000..a6e7890 --- /dev/null +++ b/uart02/uart02.hex @@ -0,0 +1,45 @@ +:1080000002D9A0E30F00A0E14C0000EBFEFFFFEA65 +:10801000001080E51EFF2FE1000090E51EFF2FE11C +:108020001EFF2FE110402DE90040A0E11C009FE55C +:10803000F8FFFFEB200010E3FBFFFF0A10009FE5B5 +:108040000410A0E1F1FFFFEB1040BDE81EFF2FE19F +:10805000545021204050212010402DE90040A0E143 +:10806000200EA0E1090050E33000809237008082AA +:10807000EBFFFFEB240CA0E10F0000E2090050E34E +:108080003000809237008082E5FFFFEB24CAA0E138 +:108090000F000CE2090050E330008092370080822C +:1080A000DFFFFFEB2438A0E10F0003E2090050E3FB +:1080B0003000809237008082D9FFFFEB2426A0E1B8 +:1080C0000F0002E2090050E3300080923700808206 +:1080D000D3FFFFEB2414A0E10F0001E2090050E3FD +:1080E0003000809237008082CDFFFFEB2402A0E1B8 +:1080F0000F0000E2090050E33000809237008082D8 +:108100000F4004E2C6FFFFEB090054E3370084820E +:1081100030008492C2FFFFEB2000A0E31040BDE8D6 +:10812000BFFFFFEA08402DE9CAFFFFEB0D00A0E307 +:10813000BBFFFFEB0A00A0E30840BDE8B8FFFFEA81 +:1081400070402DE90110A0E30040A0E11C019FE573 +:10815000AEFFFFEB18019FE50010A0E3ABFFFFEBC4 +:1081600010019FE50010A0E3A8FFFFEB08019FE5C9 +:108170000310A0E3A5FFFFEB00019FE50010A0E3C3 +:10818000A2FFFFEBE8009FE50010A0E39FFFFFEBDD +:10819000EC009FE5C610A0E39CFFFFEBE4109FE519 +:1081A000E4009FE599FFFFEBE0009FE599FFFFEBFF +:1081B0003F1AC0E3121A81E3D0009FE593FFFFEB63 +:1081C000CC009FE50010A0E390FFFFEB0050A0E380 +:1081D0000500A0E1016085E290FFFFEB025085E21F +:1081E0000600A0E18DFFFFEB960055E3F7FFFF1AB5 +:1081F000A0009FE50319A0E384FFFFEB0050A0E37C +:108200000500A0E1016085E284FFFFEB025085E2FA +:108210000600A0E181FFFFEB960055E3F7FFFF1A90 +:1082200070009FE50010A0E378FFFFEB44009FE59E +:108230000310A0E375FFFFEB5C009FE5B8FFFFEBC9 +:108240000400A0E1B6FFFFEB50009FE571FFFFEBDC +:10825000010010E3FBFFFF0A44009FE56DFFFFEB09 +:108260000010A0E138009FE568FFFFEBF5FFFFEA93 +:108270000450212044502120605021204C502120C6 +:1082800050502120485021200E010000685021202C +:1082900004002020940020209800202078563412DA +:0882A000545021204050212020 +:040000030000800079 +:00000001FF diff --git a/uart02/uart02.o b/uart02/uart02.o new file mode 100644 index 0000000..6f5588d Binary files /dev/null and b/uart02/uart02.o differ diff --git a/uart02/vectors.o b/uart02/vectors.o new file mode 100644 index 0000000..efb4368 Binary files /dev/null and b/uart02/vectors.o differ diff --git a/uart02/vectors.s b/uart02/vectors.s index 90ba5bc..b88fad3 100644 --- a/uart02/vectors.s +++ b/uart02/vectors.s @@ -19,3 +19,16 @@ GET32: .globl dummy dummy: bx lr + + +;@------------------------------------------------------------------------- +;@ +;@ Copyright (c) 2012 David Welch dwelch@dwelch.com +;@ +;@ Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: +;@ +;@ The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. +;@ +;@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +;@ +;@------------------------------------------------------------------------- diff --git a/uart03/novectors.s b/uart03/novectors.s index e1d4170..48404d9 100644 --- a/uart03/novectors.s +++ b/uart03/novectors.s @@ -32,3 +32,18 @@ GET32: .globl dummy dummy: bx lr + + + + +;@------------------------------------------------------------------------- +;@ +;@ Copyright (c) 2012 David Welch dwelch@dwelch.com +;@ +;@ Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: +;@ +;@ The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. +;@ +;@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +;@ +;@------------------------------------------------------------------------- diff --git a/uart03/uart03.c b/uart03/uart03.c index a013708..480df5a 100644 --- a/uart03/uart03.c +++ b/uart03/uart03.c @@ -114,3 +114,16 @@ int notmain ( void ) } //------------------------------------------------------------------------- //------------------------------------------------------------------------- + + +//------------------------------------------------------------------------- +// +// Copyright (c) 2012 David Welch dwelch@dwelch.com +// +// Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +// +//-------------------------------------------------------------------------