Summary information:
File: | |
Total number of instructions: | 339 |
Number of instructions executed: | 326 |
Number of instructions not executed: | 9 |
Number of incomplete conditions: | 4 |
Number of instructions skipped: | 0 |
Coverage status: | incomplete |
VerOCode Analyzer version 2.1 - DEMO VERSION |
Coverage results:
. | |||
. | C:/BrewDemo/Brewery/objPPC604gnucore/Output_Manager.o: file format elf32-powerpc | ||
. | |||
. | Disassembly of section .text: | ||
. | * RETURNS: | ||
. | * N/A | ||
. | * | ||
. | */ | ||
. | static void taskOutputManager (int arg1, ...) { | ||
. | * | 00000000 <taskOutputManager> stwu r1,-128(r1) | |
. | * | 00000004 <taskOutputManager+4> mflr r0 | |
. | * | 00000008 <taskOutputManager+8> stw r29,116(r1) | |
. | * | 0000000c <taskOutputManager+c> stw r30,120(r1) | |
. | * | 00000010 <taskOutputManager+10> stw r31,124(r1) | |
. | * | 00000014 <taskOutputManager+14> stw r0,132(r1) | |
. | * | 00000018 <taskOutputManager+18> stw r3,8(r1) | |
. | * | 0000001c <taskOutputManager+1c> stw r4,12(r1) | |
. | * | 00000020 <taskOutputManager+20> stw r5,16(r1) | |
. | * | 00000024 <taskOutputManager+24> stw r6,20(r1) | |
. | * | 00000028 <taskOutputManager+28> stw r7,24(r1) | |
. | * | 0000002c <taskOutputManager+2c> stw r8,28(r1) | |
. | * | 00000030 <taskOutputManager+30> stw r9,32(r1) | |
. | * | 00000034 <taskOutputManager+34> stw r10,36(r1) | |
1 | > | 00000038 <taskOutputManager+38> bne cr1,00000060 <taskOutputManager+60> | |
1 | - | 0000003c <taskOutputManager+3c> stfd f1,40(r1) | |
1 | - | 00000040 <taskOutputManager+40> stfd f2,48(r1) | |
1 | - | 00000044 <taskOutputManager+44> stfd f3,56(r1) | |
1 | - | 00000048 <taskOutputManager+48> stfd f4,64(r1) | |
1 | - | 0000004c <taskOutputManager+4c> stfd f5,72(r1) | |
1 | - | 00000050 <taskOutputManager+50> stfd f6,80(r1) | |
1 | - | 00000054 <taskOutputManager+54> stfd f7,88(r1) | |
1 | - | 00000058 <taskOutputManager+58> stfd f8,96(r1) | |
1 | - | 0000005c <taskOutputManager+5c> stfd f9,104(r1) | |
. | while (TRUE) { | ||
. | * | 00000060 <taskOutputManager+60> lis r29,4 | |
. | * | 00000064 <taskOutputManager+64> lis r31,8 | |
. | * | 00000068 <taskOutputManager+68> lis r30,136 | |
. | lastMsgLen = msgQReceive(msgQIdOutput,lastMsgBuf,MAX_IO_OUT_BUFFER_LENGTH, WAIT_FOREVER); | ||
. | * | 0000006c <taskOutputManager+6c> addi r4,r31,8 | |
. | * | 00000070 <taskOutputManager+70> li r5,128 | |
. | * | 00000074 <taskOutputManager+74> lwz r3,4(r29) | |
. | * | 00000078 <taskOutputManager+78> li r6,-1 | |
. | * | 0000007c <taskOutputManager+7c> bl 0000007c <taskOutputManager+7c> | |
2 | if ((lastMsgLen!=ERROR)&&(lastMsgLen>0)) { | ||
. | * | 00000080 <taskOutputManager+80> not r9,r3 | |
. | * | 00000084 <taskOutputManager+84> addic r0,r9,-1 | |
. | * | 00000088 <taskOutputManager+88> subfe r9,r0,r9 | |
. | * | 0000008c <taskOutputManager+8c> srawi r0,r3,31 | |
. | * | 00000090 <taskOutputManager+90> subf r0,r3,r0 | |
. | * | 00000094 <taskOutputManager+94> rlwinm r0,r0,1,31,31 | |
. | * | 00000098 <taskOutputManager+98> and. r11,r9,r0 | |
. | * | 0000009c <taskOutputManager+9c> stw r3,136(r30) | |
2 | < | 000000a0 <taskOutputManager+a0> beq 0000006c <taskOutputManager+6c> | |
. | switch (lastMsgBuf[0]) { | ||
. | * | 000000a4 <taskOutputManager+a4> lbz r0,8(r31) | |
. | * | 000000a8 <taskOutputManager+a8> cmpwi cr1,r0,7 | |
. | * | 000000ac <taskOutputManager+ac> beq cr1,000000bc <taskOutputManager+bc> | |
. | * | 000000b0 <taskOutputManager+b0> cmpwi cr1,r0,10 | |
. | * | 000000b4 <taskOutputManager+b4> beq cr1,000000c4 <taskOutputManager+c4> | |
. | * | 000000b8 <taskOutputManager+b8> b 000000cc <taskOutputManager+cc> | |
. | case MSG_ALARM: ioSoundAlarm(); break; | ||
. | * | 000000bc <taskOutputManager+bc> bl 000000bc <taskOutputManager+bc> | |
. | * | 000000c0 <taskOutputManager+c0> b 0000006c <taskOutputManager+6c> | |
. | case MSG_EOL : ioOutputEOL(); break; | ||
. | * | 000000c4 <taskOutputManager+c4> bl 000000c4 <taskOutputManager+c4> | |
. | * | 000000c8 <taskOutputManager+c8> b 0000006c <taskOutputManager+6c> | |
. | default : ioOutputBuffer(lastMsgBuf,lastMsgLen); | ||
. | * | 000000cc <taskOutputManager+cc> lwz r4,136(r30) | |
. | * | 000000d0 <taskOutputManager+d0> addi r3,r31,8 | |
. | * | 000000d4 <taskOutputManager+d4> bl 000000d4 <taskOutputManager+d4> | |
. | } | ||
. | } | ||
. | } | ||
. | * | 000000d8 <taskOutputManager+d8> b 0000006c <taskOutputManager+6c> | |
. | } | ||
. | |||
. | |||
. | /******************************************************************************* | ||
. | * | ||
. | * strlen - get string length | ||
. | * | ||
. | * This routine returns the number if non-zero characters in | ||
. | * the null-terminated string pointed to by <s>. | ||
. | * | ||
. | * RETURNS: | ||
. | * Positive integer or 0 when empty string. | ||
. | * | ||
. | */ | ||
. | static int strlen(char *s) { | ||
. | int i = 0; | ||
. | while (s[i++]); | ||
. | * | 000000dc <strlen> lbz r0,0(r3) | |
. | * | 000000e0 <strlen+4> cmpwi cr1,r0,0 | |
. | * | 000000e4 <strlen+8> li r9,1 | |
3 | < | 000000e8 <strlen+c> beq cr1,000000fc <strlen+20> | |
. | * | 000000ec <strlen+10> lbzx r0,r3,r9 | |
. | * | 000000f0 <strlen+14> cmpwi cr1,r0,0 | |
. | * | 000000f4 <strlen+18> addi r9,r9,1 | |
. | * | 000000f8 <strlen+1c> bne cr1,000000ec <strlen+10> | |
. | return i-1; | ||
. | * | 000000fc <strlen+20> addi r3,r9,-1 | |
. | } | ||
. | * | 00000100 <strlen+24> blr | |
. | |||
. | |||
. | /******************************************************************************* | ||
. | * | ||
. | * spawnOutputManager - spawn Output Manager task | ||
. | * | ||
. | * This routine spawns Output Manager task, creates its message queue and | ||
. | * returns the task's ID. | ||
. | * | ||
. | * RETURNS: | ||
. | * Task_id or ERROR in case of any problem. | ||
. | * | ||
. | */ | ||
. | int spawnOutputManager (void) { | ||
. | * | 00000104 <spawnOutputManager> stwu r1,-56(r1) | |
. | * | 00000108 <spawnOutputManager+4> mflr r0 | |
. | * | 0000010c <spawnOutputManager+8> stw r29,44(r1) | |
. | * | 00000110 <spawnOutputManager+c> stw r30,48(r1) | |
. | * | 00000114 <spawnOutputManager+10> stw r31,52(r1) | |
. | * | 00000118 <spawnOutputManager+14> stw r0,60(r1) | |
. | msgQIdOutput = msgQCreate( 100, /* max messages that can be queued */ | ||
. | * | 0000011c <spawnOutputManager+18> li r3,100 | |
. | * | 00000120 <spawnOutputManager+1c> li r4,128 | |
. | * | 00000124 <spawnOutputManager+20> li r5,0 | |
. | * | 00000128 <spawnOutputManager+24> bl 00000128 <spawnOutputManager+24> | |
. | * | 0000012c <spawnOutputManager+28> lis r29,4 | |
. | * | 00000130 <spawnOutputManager+2c> stw r3,4(r29) | |
. | MAX_IO_OUT_BUFFER_LENGTH,/* max bytes in a message */ | ||
. | MSG_Q_FIFO); | ||
. | tidOutputManager = taskSpawn("taskOutputManager", EQUAL_PRIORITY, 0, 4096, | ||
. | * | 00000134 <spawnOutputManager+30> li r0,0 | |
. | * | 00000138 <spawnOutputManager+34> stw r0,8(r1) | |
. | * | 0000013c <spawnOutputManager+38> stw r0,12(r1) | |
. | * | 00000140 <spawnOutputManager+3c> stw r0,16(r1) | |
. | * | 00000144 <spawnOutputManager+40> stw r0,20(r1) | |
. | * | 00000148 <spawnOutputManager+44> stw r0,24(r1) | |
. | * | 0000014c <spawnOutputManager+48> stw r0,28(r1) | |
. | * | 00000150 <spawnOutputManager+4c> stw r0,32(r1) | |
. | * | 00000154 <spawnOutputManager+50> lis r3,0 | |
. | * | 00000158 <spawnOutputManager+54> addi r3,r3,0 | |
. | * | 0000015c <spawnOutputManager+58> li r4,5 | |
. | * | 00000160 <spawnOutputManager+5c> li r5,0 | |
. | * | 00000164 <spawnOutputManager+60> li r6,4096 | |
. | * | 00000168 <spawnOutputManager+64> lis r7,0 | |
. | * | 0000016c <spawnOutputManager+68> addi r7,r7,0 | |
. | * | 00000170 <spawnOutputManager+6c> li r8,0 | |
. | * | 00000174 <spawnOutputManager+70> li r9,0 | |
. | * | 00000178 <spawnOutputManager+74> li r10,0 | |
. | * | 0000017c <spawnOutputManager+78> bl 0000017c <spawnOutputManager+78> | |
. | (FUNCPTR) taskOutputManager,0,0,0,0,0,0,0,0,0,0); | ||
4 | if ((msgQIdOutput==NULL)||(tidOutputManager==ERROR)) { | ||
. | * | 00000180 <spawnOutputManager+7c> lwz r0,4(r29) | |
. | * | 00000184 <spawnOutputManager+80> cmpwi cr1,r0,0 | |
. | * | 00000188 <spawnOutputManager+84> lis r9,0 | |
. | * | 0000018c <spawnOutputManager+88> stw r3,0(r9) | |
5 | * | 00000190 <spawnOutputManager+8c> beq cr1,0000019c <spawnOutputManager+98> | |
. | * | 00000194 <spawnOutputManager+90> cmpwi cr1,r3,-1 | |
5 | * | 00000198 <spawnOutputManager+94> bne cr1,000001a0 <spawnOutputManager+9c> | |
. | return ERROR; | ||
. | * | 0000019c <spawnOutputManager+98> li r3,-1 | |
. | } else { | ||
. | return tidOutputManager; | ||
. | * | 000001a0 <spawnOutputManager+9c> lwz r0,60(r1) | |
. | * | 000001a4 <spawnOutputManager+a0> mtlr r0 | |
. | * | 000001a8 <spawnOutputManager+a4> lwz r29,44(r1) | |
. | * | 000001ac <spawnOutputManager+a8> lwz r30,48(r1) | |
. | * | 000001b0 <spawnOutputManager+ac> lwz r31,52(r1) | |
. | * | 000001b4 <spawnOutputManager+b0> addi r1,r1,56 | |
. | * | 000001b8 <spawnOutputManager+b4> blr | |
. | } | ||
. | } | ||
. | |||
. | |||
. | /******************************************************************************* | ||
. | * | ||
. | * outputAlarm - output alarm signal (non-blocking) | ||
. | * | ||
. | * This routine sends the alarm message to the output queue with the URGENT flag. | ||
. | * It is non-blocking; if message cannot be sent immediately, it will be skipped. | ||
. | * | ||
. | * RETURNS: | ||
. | * N/A | ||
. | * | ||
. | */ | ||
. | void outputAlarm(void) { | ||
. | * | 000001bc <outputAlarm> stwu r1,-16(r1) | |
. | * | 000001c0 <outputAlarm+4> mflr r0 | |
. | * | 000001c4 <outputAlarm+8> stw r0,20(r1) | |
. | char c = MSG_ALARM; | ||
. | * | 000001c8 <outputAlarm+c> li r0,7 | |
. | * | 000001cc <outputAlarm+10> stb r0,8(r1) | |
. | msgQSend(msgQIdOutput,&c,1,NO_WAIT,MSG_PRI_URGENT); | ||
. | * | 000001d0 <outputAlarm+14> lis r9,4 | |
. | * | 000001d4 <outputAlarm+18> addi r4,r1,8 | |
. | * | 000001d8 <outputAlarm+1c> li r5,1 | |
. | * | 000001dc <outputAlarm+20> li r6,0 | |
. | * | 000001e0 <outputAlarm+24> lwz r3,4(r9) | |
. | * | 000001e4 <outputAlarm+28> li r7,1 | |
. | * | 000001e8 <outputAlarm+2c> bl 000001e8 <outputAlarm+2c> | |
. | } | ||
. | * | 000001ec <outputAlarm+30> lwz r0,20(r1) | |
. | * | 000001f0 <outputAlarm+34> mtlr r0 | |
. | * | 000001f4 <outputAlarm+38> addi r1,r1,16 | |
. | * | 000001f8 <outputAlarm+3c> blr | |
. | |||
. | |||
. | /******************************************************************************* | ||
. | * | ||
. | * outputBuffer - output buffer (blocking) | ||
. | * | ||
. | * This routine sends first <len> characters of a buffer pointed to by <buf>. | ||
. | * It blocks calling task as long as the characters are sucessfully sent to | ||
. | * the output message queue. | ||
. | * | ||
. | * RETURNS: | ||
. | * N/A | ||
. | * | ||
. | */ | ||
. | void outputBuffer(char *buf, int len) { | ||
. | * | 000001fc <outputBuffer> stwu r1,-8(r1) | |
. | * | 00000200 <outputBuffer+4> mflr r0 | |
. | * | 00000204 <outputBuffer+8> stw r0,12(r1) | |
. | * | 00000208 <outputBuffer+c> mr r11,r3 | |
. | * | 0000020c <outputBuffer+10> mr r5,r4 | |
. | msgQSend(msgQIdOutput,buf, | ||
. | * | 00000210 <outputBuffer+14> lis r9,4 | |
. | * | 00000214 <outputBuffer+18> mr r4,r11 | |
. | * | 00000218 <outputBuffer+1c> cmpwi cr1,r5,129 | |
. | * | 0000021c <outputBuffer+20> li r6,-1 | |
. | * | 00000220 <outputBuffer+24> li r7,0 | |
. | * | 00000224 <outputBuffer+28> lwz r3,4(r9) | |
. | * | 00000228 <outputBuffer+2c> mfcr r0 | |
. | * | 0000022c <outputBuffer+30> rlwinm r0,r0,5,31,31 | |
. | * | 00000230 <outputBuffer+34> neg r0,r0 | |
. | * | 00000234 <outputBuffer+38> not r9,r0 | |
. | * | 00000238 <outputBuffer+3c> rlwinm r9,r9,0,24,24 | |
. | * | 0000023c <outputBuffer+40> and r5,r5,r0 | |
. | * | 00000240 <outputBuffer+44> or r5,r5,r9 | |
. | * | 00000244 <outputBuffer+48> bl 00000244 <outputBuffer+48> | |
. | * | 00000248 <outputBuffer+4c> lwz r0,12(r1) | |
. | * | 0000024c <outputBuffer+50> mtlr r0 | |
. | * | 00000250 <outputBuffer+54> addi r1,r1,8 | |
. | * | 00000254 <outputBuffer+58> blr | |
. | (len<=MAX_IO_OUT_BUFFER_LENGTH)?len:MAX_IO_OUT_BUFFER_LENGTH, | ||
. | WAIT_FOREVER,MSG_PRI_NORMAL); | ||
. | } | ||
. | |||
. | |||
. | /******************************************************************************* | ||
. | * | ||
. | * outputString - output string (blocking) | ||
. | * | ||
. | * This routine sends to the queue a null-terminated string pointed to by <s>. | ||
. | * The NULL character is not sent. | ||
. | * The procedure blocks calling task as long as the characters are sucessfully | ||
. | * sent to the output message queue. | ||
. | * | ||
. | * RETURNS: | ||
. | * N/A | ||
. | * | ||
. | */ | ||
. | void outputString(char *s) { | ||
. | * | 00000258 <outputString> stwu r1,-24(r1) | |
. | * | 0000025c <outputString+4> mflr r0 | |
. | * | 00000260 <outputString+8> stw r29,12(r1) | |
. | * | 00000264 <outputString+c> stw r30,16(r1) | |
. | * | 00000268 <outputString+10> stw r31,20(r1) | |
. | * | 0000026c <outputString+14> stw r0,28(r1) | |
. | * | 00000270 <outputString+18> mr r29,r3 | |
. | outputBuffer(s,strlen(s)); | ||
. | * | 00000274 <outputString+1c> bl 000000dc <strlen> | |
. | * | 00000278 <outputString+20> mr r4,r3 | |
. | * | 0000027c <outputString+24> mr r3,r29 | |
. | * | 00000280 <outputString+28> bl 000001fc <outputBuffer> | |
. | * | 00000284 <outputString+2c> lwz r0,28(r1) | |
. | * | 00000288 <outputString+30> mtlr r0 | |
. | * | 0000028c <outputString+34> lwz r29,12(r1) | |
. | * | 00000290 <outputString+38> lwz r30,16(r1) | |
. | * | 00000294 <outputString+3c> lwz r31,20(r1) | |
. | * | 00000298 <outputString+40> addi r1,r1,24 | |
. | * | 0000029c <outputString+44> blr | |
. | } | ||
. | |||
. | |||
. | /******************************************************************************* | ||
. | * | ||
. | * outputLine - output line (blocking) | ||
. | * | ||
. | * This routine sends to the queue a null-terminated string pointed to by <line>. | ||
. | * (the NULL character is not sent). After that it sends another message to force | ||
. | * the Output task to output the EOL character whatever it is. | ||
. | * The procedure blocks calling task as long as the characters are sucessfully | ||
. | * sent to the output message queue. | ||
. | * | ||
. | * RETURNS: | ||
. | * N/A | ||
. | * | ||
. | */ | ||
. | void outputLine(char *line) { | ||
. | * | 000002a0 <outputLine> stwu r1,-32(r1) | |
. | * | 000002a4 <outputLine+4> mflr r0 | |
. | * | 000002a8 <outputLine+8> stw r29,20(r1) | |
. | * | 000002ac <outputLine+c> stw r30,24(r1) | |
. | * | 000002b0 <outputLine+10> stw r31,28(r1) | |
. | * | 000002b4 <outputLine+14> stw r0,36(r1) | |
. | * | 000002b8 <outputLine+18> mr r29,r3 | |
. | char c = MSG_EOL; | ||
. | * | 000002bc <outputLine+1c> li r0,10 | |
. | * | 000002c0 <outputLine+20> stb r0,8(r1) | |
. | outputBuffer(line,strlen(line)); | ||
. | * | 000002c4 <outputLine+24> bl 000000dc <strlen> | |
. | * | 000002c8 <outputLine+28> mr r4,r3 | |
. | * | 000002cc <outputLine+2c> mr r3,r29 | |
. | * | 000002d0 <outputLine+30> bl 000001fc <outputBuffer> | |
. | msgQSend(msgQIdOutput,&c,1,WAIT_FOREVER,MSG_PRI_NORMAL); | ||
. | * | 000002d4 <outputLine+34> addi r4,r1,8 | |
. | * | 000002d8 <outputLine+38> lis r9,4 | |
. | * | 000002dc <outputLine+3c> li r5,1 | |
. | * | 000002e0 <outputLine+40> li r6,-1 | |
. | * | 000002e4 <outputLine+44> lwz r3,4(r9) | |
. | * | 000002e8 <outputLine+48> li r7,0 | |
. | * | 000002ec <outputLine+4c> bl 000002ec <outputLine+4c> | |
. | } | ||
. | * | 000002f0 <outputLine+50> lwz r0,36(r1) | |
. | * | 000002f4 <outputLine+54> mtlr r0 | |
. | * | 000002f8 <outputLine+58> lwz r29,20(r1) | |
. | * | 000002fc <outputLine+5c> lwz r30,24(r1) | |
. | * | 00000300 <outputLine+60> lwz r31,28(r1) | |
. | * | 00000304 <outputLine+64> addi r1,r1,32 | |
. | * | 00000308 <outputLine+68> blr | |
. | |||
. | |||
. | /******************************************************************************* | ||
. | * | ||
. | * outputChar - output one character (blocking) | ||
. | * | ||
. | * This routine sends to the queue the <c> character. | ||
. | * The procedure blocks calling task as long as the character is sucessfully | ||
. | * sent to the output message queue. | ||
. | * | ||
. | * RETURNS: | ||
. | * N/A | ||
. | * | ||
. | */ | ||
. | void outputChar(char c) { | ||
. | * | 0000030c <outputChar> stwu r1,-16(r1) | |
. | * | 00000310 <outputChar+4> mflr r0 | |
. | * | 00000314 <outputChar+8> stw r0,20(r1) | |
. | * | 00000318 <outputChar+c> stb r3,8(r1) | |
. | msgQSend(msgQIdOutput,&c,1,WAIT_FOREVER,MSG_PRI_NORMAL); | ||
. | * | 0000031c <outputChar+10> lis r9,4 | |
. | * | 00000320 <outputChar+14> addi r4,r1,8 | |
. | * | 00000324 <outputChar+18> li r5,1 | |
. | * | 00000328 <outputChar+1c> li r6,-1 | |
. | * | 0000032c <outputChar+20> lwz r3,4(r9) | |
. | * | 00000330 <outputChar+24> li r7,0 | |
. | * | 00000334 <outputChar+28> bl 00000334 <outputChar+28> | |
. | * | 00000338 <outputChar+2c> lwz r0,20(r1) | |
. | * | 0000033c <outputChar+30> mtlr r0 | |
. | * | 00000340 <outputChar+34> addi r1,r1,16 | |
. | * | 00000344 <outputChar+38> blr | |
. | } | ||
. | |||
. | |||
. | /******************************************************************************* | ||
. | * | ||
. | * outputTime - output time (blocking) | ||
. | * | ||
. | * This routine converts time to string and sends the string to the queue. | ||
. | * Format: "hh:mm"; <hours> mod 24, <minutes> mod 60 !!! | ||
. | * The procedure blocks calling task as long as the characters are sucessfully | ||
. | * sent to the output message queue. | ||
. | * | ||
. | * RETURNS: | ||
. | * N/A | ||
. | * | ||
. | */ | ||
. | void outputTime(int hours, int minutes) { | ||
. | * | 00000348 <outputTime> stwu r1,-8(r1) | |
. | * | 0000034c <outputTime+4> mflr r0 | |
. | * | 00000350 <outputTime+8> stw r0,12(r1) | |
. | * | 00000354 <outputTime+c> mr r8,r3 | |
. | * | 00000358 <outputTime+10> mr r6,r4 | |
. | char *msgBuf = "00:00"; | ||
. | msgBuf[0] = (hours%24/10)+'0'; | ||
. | * | 0000035c <outputTime+14> lis r9,10922 | |
. | * | 00000360 <outputTime+18> ori r9,r9,43691 | |
. | * | 00000364 <outputTime+1c> lis r7,26214 | |
. | * | 00000368 <outputTime+20> ori r7,r7,26215 | |
. | * | 0000036c <outputTime+24> srawi r0,r8,31 | |
. | * | 00000370 <outputTime+28> mulhw r9,r8,r9 | |
. | msgBuf[1] = (hours%24%10)+'0'; | ||
. | msgBuf[3] = (minutes%60/10)+'0'; | ||
. | * | 00000374 <outputTime+2c> lis r10,-30584 | |
. | * | 00000378 <outputTime+30> ori r10,r10,34953 | |
. | * | 0000037c <outputTime+34> lis r4,20 | |
. | msgBuf[4] = (minutes%60%10)+'0'; | ||
. | msgQSend(msgQIdOutput,msgBuf,5,WAIT_FOREVER,MSG_PRI_NORMAL); | ||
. | * | 00000380 <outputTime+38> li r5,5 | |
. | * | 00000384 <outputTime+3c> mulhw r10,r6,r10 | |
. | * | 00000388 <outputTime+40> srawi r9,r9,2 | |
. | * | 0000038c <outputTime+44> subf r9,r0,r9 | |
. | * | 00000390 <outputTime+48> rlwinm r0,r9,1,0,30 | |
. | * | 00000394 <outputTime+4c> add r0,r0,r9 | |
. | * | 00000398 <outputTime+50> rlwinm r0,r0,3,0,28 | |
. | * | 0000039c <outputTime+54> subf r8,r0,r8 | |
. | * | 000003a0 <outputTime+58> mulhw r11,r8,r7 | |
. | * | 000003a4 <outputTime+5c> lis r9,4 | |
. | * | 000003a8 <outputTime+60> srawi r0,r8,31 | |
. | * | 000003ac <outputTime+64> add r10,r10,r6 | |
. | * | 000003b0 <outputTime+68> srawi r10,r10,5 | |
. | * | 000003b4 <outputTime+6c> lwz r3,4(r9) | |
. | * | 000003b8 <outputTime+70> srawi r11,r11,2 | |
. | * | 000003bc <outputTime+74> subf r11,r0,r11 | |
. | * | 000003c0 <outputTime+78> addi r0,r11,48 | |
. | * | 000003c4 <outputTime+7c> stb r0,20(r4) | |
. | * | 000003c8 <outputTime+80> rlwinm r9,r11,2,0,29 | |
. | * | 000003cc <outputTime+84> add r9,r9,r11 | |
. | * | 000003d0 <outputTime+88> rlwinm r9,r9,1,0,30 | |
. | * | 000003d4 <outputTime+8c> srawi r0,r6,31 | |
. | * | 000003d8 <outputTime+90> subf r10,r0,r10 | |
. | * | 000003dc <outputTime+94> rlwinm r0,r10,4,0,27 | |
. | * | 000003e0 <outputTime+98> subf r0,r10,r0 | |
. | * | 000003e4 <outputTime+9c> rlwinm r0,r0,2,0,29 | |
. | * | 000003e8 <outputTime+a0> subf r6,r0,r6 | |
. | * | 000003ec <outputTime+a4> subf r8,r9,r8 | |
. | * | 000003f0 <outputTime+a8> mulhw r7,r6,r7 | |
. | * | 000003f4 <outputTime+ac> addi r8,r8,48 | |
. | * | 000003f8 <outputTime+b0> addi r4,r4,20 | |
. | * | 000003fc <outputTime+b4> stb r8,1(r4) | |
. | * | 00000400 <outputTime+b8> srawi r0,r6,31 | |
. | * | 00000404 <outputTime+bc> srawi r7,r7,2 | |
. | * | 00000408 <outputTime+c0> subf r7,r0,r7 | |
. | * | 0000040c <outputTime+c4> addi r0,r7,48 | |
. | * | 00000410 <outputTime+c8> stb r0,3(r4) | |
. | * | 00000414 <outputTime+cc> rlwinm r0,r7,2,0,29 | |
. | * | 00000418 <outputTime+d0> add r0,r0,r7 | |
. | * | 0000041c <outputTime+d4> rlwinm r0,r0,1,0,30 | |
. | * | 00000420 <outputTime+d8> subf r6,r0,r6 | |
. | * | 00000424 <outputTime+dc> addi r6,r6,48 | |
. | * | 00000428 <outputTime+e0> stb r6,4(r4) | |
. | * | 0000042c <outputTime+e4> li r6,-1 | |
. | * | 00000430 <outputTime+e8> li r7,0 | |
. | * | 00000434 <outputTime+ec> bl 00000434 <outputTime+ec> | |
. | } | ||
. | * | 00000438 <outputTime+f0> lwz r0,12(r1) | |
. | * | 0000043c <outputTime+f4> mtlr r0 | |
. | * | 00000440 <outputTime+f8> addi r1,r1,8 | |
. | * | 00000444 <outputTime+fc> blr | |
. | |||
. | |||
. | /******************************************************************************* | ||
. | * | ||
. | * outputInteger - output integer (blocking) | ||
. | * | ||
. | * This routine converts <val> to a string and sends the string to the queue. | ||
. | * If the representation is longer than <len> then only <len> least significant | ||
. | * digits (without a sign) are printed. If it is shorter than <len> then a proper | ||
. | * number of leading spaces is added. Max allowed <len> is equal to 20. | ||
. | * The procedure blocks calling task as long as the characters are sucessfully | ||
. | * sent to the output message queue. | ||
. | * | ||
. | * RETURNS: | ||
. | * N/A | ||
. | * | ||
. | */ | ||
. | void outputInteger (int val, int len) { | ||
. | * | 00000448 <outputInteger> stwu r1,-56(r1) | |
. | * | 0000044c <outputInteger+4> mflr r0 | |
. | * | 00000450 <outputInteger+8> stw r30,48(r1) | |
. | * | 00000454 <outputInteger+c> stw r31,52(r1) | |
. | * | 00000458 <outputInteger+10> stw r0,60(r1) | |
. | * | 0000045c <outputInteger+14> mr r31,r3 | |
. | * | 00000460 <outputInteger+18> mr r30,r4 | |
. | char msgBuf[20] = " 0"; | ||
. | * | 00000464 <outputInteger+1c> addi r3,r1,24 | |
. | * | 00000468 <outputInteger+20> lis r4,28 | |
. | * | 0000046c <outputInteger+24> addi r4,r4,28 | |
. | * | 00000470 <outputInteger+28> li r5,20 | |
. | * | 00000474 <outputInteger+2c> crclr 4*cr1+eq | |
. | * | 00000478 <outputInteger+30> bl 00000478 <outputInteger+30> | |
. | int i = 20; | ||
. | * | 0000047c <outputInteger+34> li r11,20 | |
. | char neg = FALSE; | ||
. | * | 00000480 <outputInteger+38> li r7,0 | |
6 | if (len>20||len<1) { | ||
. | * | 00000484 <outputInteger+3c> addi r0,r30,-1 | |
. | * | 00000488 <outputInteger+40> subfic r0,r0,19 | |
. | * | 0000048c <outputInteger+44> subfe r0,r0,r0 | |
. | * | 00000490 <outputInteger+48> nand r0,r0,r0 | |
. | * | 00000494 <outputInteger+4c> not r9,r0 | |
. | len = 20; | ||
. | } | ||
. | if (val<0) { | ||
. | * | 00000498 <outputInteger+50> cmpwi cr1,r31,0 | |
. | * | 0000049c <outputInteger+54> andi. r9,r9,20 | |
. | * | 000004a0 <outputInteger+58> and r0,r30,r0 | |
. | * | 000004a4 <outputInteger+5c> or r30,r0,r9 | |
. | * | 000004a8 <outputInteger+60> bge cr1,000004b4 <outputInteger+6c> | |
. | val = -val; | ||
. | * | 000004ac <outputInteger+64> neg r31,r31 | |
. | neg=TRUE; | ||
. | * | 000004b0 <outputInteger+68> li r7,1 | |
. | } | ||
. | while (val>0) { | ||
. | * | 000004b4 <outputInteger+6c> cmpwi cr1,r31,0 | |
3 | < | 000004b8 <outputInteger+70> ble cr1,000004fc <outputInteger+b4> | |
. | * | 000004bc <outputInteger+74> lis r8,26214 | |
. | * | 000004c0 <outputInteger+78> ori r8,r8,26215 | |
. | * | 000004c4 <outputInteger+7c> addi r10,r1,24 | |
. | msgBuf[--i] = '0' + val % 10; | ||
. | * | 000004c8 <outputInteger+80> mulhw r0,r31,r8 | |
. | * | 000004cc <outputInteger+84> srawi r9,r31,31 | |
. | * | 000004d0 <outputInteger+88> srawi r0,r0,2 | |
. | * | 000004d4 <outputInteger+8c> subf r0,r9,r0 | |
. | * | 000004d8 <outputInteger+90> rlwinm r9,r0,2,0,29 | |
. | * | 000004dc <outputInteger+94> add r9,r9,r0 | |
. | * | 000004e0 <outputInteger+98> rlwinm r9,r9,1,0,30 | |
. | * | 000004e4 <outputInteger+9c> subf r9,r9,r31 | |
. | val = val / 10; | ||
. | } | ||
. | * | 000004e8 <outputInteger+a0> mr. r31,r0 | |
. | * | 000004ec <outputInteger+a4> addi r11,r11,-1 | |
. | * | 000004f0 <outputInteger+a8> addi r9,r9,48 | |
. | * | 000004f4 <outputInteger+ac> stbx r9,r10,r11 | |
. | * | 000004f8 <outputInteger+b0> bgt 000004c8 <outputInteger+80> | |
. | if (neg) { | ||
. | * | 000004fc <outputInteger+b4> cmpwi cr1,r7,0 | |
. | * | 00000500 <outputInteger+b8> beq cr1,00000514 <outputInteger+cc> | |
. | msgBuf[--i] = '-'; | ||
. | * | 00000504 <outputInteger+bc> addi r11,r11,-1 | |
. | * | 00000508 <outputInteger+c0> li r0,45 | |
. | * | 0000050c <outputInteger+c4> addi r9,r1,24 | |
. | * | 00000510 <outputInteger+c8> stbx r0,r9,r11 | |
. | } | ||
. | msgQSend(msgQIdOutput,&(msgBuf[20-len]),len,WAIT_FOREVER,MSG_PRI_NORMAL); | ||
. | * | 00000514 <outputInteger+cc> addi r4,r1,44 | |
. | * | 00000518 <outputInteger+d0> subf r4,r30,r4 | |
. | * | 0000051c <outputInteger+d4> mr r5,r30 | |
. | * | 00000520 <outputInteger+d8> lis r9,4 | |
. | * | 00000524 <outputInteger+dc> li r6,-1 | |
. | * | 00000528 <outputInteger+e0> lwz r3,4(r9) | |
. | * | 0000052c <outputInteger+e4> li r7,0 | |
. | * | 00000530 <outputInteger+e8> bl 00000530 <outputInteger+e8> | |
. | } | ||
. | * | 00000534 <outputInteger+ec> lwz r0,60(r1) | |
. | * | 00000538 <outputInteger+f0> mtlr r0 | |
. | * | 0000053c <outputInteger+f4> lwz r30,48(r1) | |
. | * | 00000540 <outputInteger+f8> lwz r31,52(r1) | |
. | * | 00000544 <outputInteger+fc> addi r1,r1,56 | |
. | * | 00000548 <outputInteger+100> blr |
List of comments:
Id: | Comment: |
1 | The task permits more parameters than are used. This is deactivated code. |
2 | Coverage is incomplete here, but the code cannot be fully covered. See analysis in unoptimised code line 001050 and 001064 to see the outomes of the individual conditions. The conditions are kept as robustness cases, even though coverage cannot be shown |
3 | while loop has two conditions generated for it. The first conditions tests whether the loop should enter. The second condition tests when to exit. the first is true and false, the first is always true. Compiler generated, deactivated code |
4 | Full path coverage shown |
5 | Branch maps to condition linked by short circuit evaluation. condition evaluated TRUE and FALSE |
6 | Full path coverage shown in the unoptimized coverage listing. Line 001664 and 001670 |