From: SourceForge.net <no...@so...> - 2003-11-19 17:33:56
|
Bugs item #755323, was opened at 2003-06-16 08:53 Message generated for change (Settings changed) made by epetrich You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=100599&aid=755323&group_id=599 Category: msc51(8051) target Group: None Status: Open >Resolution: Accepted Priority: 5 Submitted By: Edwin Kouwenberg (edwinkouwenberg) >Assigned to: Erik Petrich (epetrich) Summary: global bit-variable kept in register over function call Initial Comment: The description: The source code line if (b_prot_command_busy == FALSE) is not interpretted correctly. The vesion: SDCC : mcs51/gbz80/z80/avr/ds390/pic14/pic16/TININative/xa51/ds400 2.3.5 (Jun 1 2003) (MINGW32) The command line: O:\FastTrack\FT0076-CPM2A-GRAF\Tools\sdcc\bin\sdcc.exe -IO:\FastTrack\FT0076-CPM2A-GRAF\Tools\SDCC\include -c -V protocol.c The (bug) source code: bug\protocol.c line 315 - 327 #if 0 b_work_around_compiler_bug = b_prot_command_busy; if (b_work_around_compiler_bug == FALSE) #else if (b_prot_command_busy == FALSE) #endif { pu8_input_data[PROT_INPUT_DATA_INDEX_STATUS] = u8_prot_input_status; pu8_input_data[PROT_INPUT_DATA_INDEX_DATA] = u8_prot_input_data; } else { } The (bug) result code: bug\protocol.rst 745 ;protocol.c:319: if (b_prot_command_busy == FALSE) 746 ; genIfx 075C ED 747 mov a,r5 748 ; genIfxJump 749 ; Peephole 110 removed ljmp by inverse jump logic 075D 60 1B 750 jz 00127$ 075F 751 00163$: 752 ;protocol.c:322: pu8_input_data[PROT_INPUT_DATA_INDEX_STATUS] = u8_prot_input_status; 753 ; genPointerSet 754 ; genGenPointerSet 075F 8A 82 755 mov dpl,r2 0761 8B 83 756 mov dph,r3 0763 8C F0 757 mov b,r4 0765 E5 36 758 mov a,_u8_prot_input_status 0767 12 0C 27 759 lcall __gptrput 760 ;protocol.c:323: pu8_input_data[PROT_INPUT_DATA_INDEX_DATA] = u8_prot_input_data; 761 ; genPlus 762 ; genPlusIncr 076A 0A 763 inc r2 076B BA 00 01 764 cjne r2,#0x00,00164$ 076E 0B 765 inc r3 076F 766 00164$: 767 ; genPointerSet 768 ; genGenPointerSet 076F 8A 82 769 mov dpl,r2 0771 8B 83 770 mov dph,r3 0773 8C F0 771 mov b,r4 0775 E5 35 772 mov a,_u8_prot_input_data 0777 12 0C 27 773 lcall __gptrput 077A 774 00127$: The (workaround) source code: bug_workaround\protocol.c line 315 - 327 #if 1 b_work_around_compiler_bug = b_prot_command_busy; if (b_work_around_compiler_bug == FALSE) #else if (b_prot_command_busy == FALSE) #endif { pu8_input_data[PROT_INPUT_DATA_INDEX_STATUS] = u8_prot_input_status; pu8_input_data[PROT_INPUT_DATA_INDEX_DATA] = u8_prot_input_data; } else { } The (workaround) result code: bug_workaroud\protocol.rst 722 ;protocol.c:316: b_work_around_compiler_bug = b_prot_command_busy; 723 ; genAssign 0736 AD 32 724 mov r5,_b_prot_command_busy 725 ;protocol.c:317: if (b_work_around_compiler_bug == FALSE) 726 ; genCmpEq 727 ; Peephole 132 changed ljmp to sjmp 728 ; Peephole 199 optimized misc jump sequence 0738 BD 00 1B 729 cjne r5,#0x00,00127$ 730 ;00162$: 731 ; Peephole 200 removed redundant sjmp 073B 732 00163$: 733 ;protocol.c:322: pu8_input_data[PROT_INPUT_DATA_INDEX_STATUS] = u8_prot_input_status; 734 ; genPointerSet 735 ; genGenPointerSet 073B 8A 82 736 mov dpl,r2 073D 8B 83 737 mov dph,r3 073F 8C F0 738 mov b,r4 0741 E5 36 739 mov a,_u8_prot_input_status 0743 12 0C 03 740 lcall __gptrput 741 ;protocol.c:323: pu8_input_data[PROT_INPUT_DATA_INDEX_DATA] = u8_prot_input_data; 742 ; genPlus 743 ; genPlusIncr 0746 0A 744 inc r2 0747 BA 00 01 745 cjne r2,#0x00,00164$ 074A 0B 746 inc r3 074B 747 00164$: 748 ; genPointerSet 749 ; genGenPointerSet 074B 8A 82 750 mov dpl,r2 074D 8B 83 751 mov dph,r3 074F 8C F0 752 mov b,r4 0751 E5 35 753 mov a,_u8_prot_input_data 0753 12 0C 03 754 lcall __gptrput 0756 755 00127$: ---------------------------------------------------------------------- Comment By: Bernhard Held (bernhardheld) Date: 2003-06-16 14:54 Message: Logged In: YES user_id=203539 Similiar to #676444 ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=100599&aid=755323&group_id=599 |