> --__--__--
> 
> Message: 3
> From: Dmitry <di...@mail.ru>
> Organization: EIS
> To: mspgcc-users@lists.sourceforge.net
> Subject: Re: [Mspgcc-users] long long again...
> Date: Fri, 28 Feb 2003 15:40:26 +0300
> Reply-To: mspgcc-users@lists.sourceforge.net
> 
> Will be fixed immediately when you send sources which cause this error.
> ~d
> 

Here they are:

============================================
The source:

#include <io.h>
#include <signal.h>
#include <stdlib.h>
#include <stdio.h>

volatile long long x,y;

void main(void)
{

x = y * 600000LL;

}

===========================================
The assembler produced:

        .file   "llong.c"
        .arch msp430x148

/* Hardware multiplier registers: */
__MPY=0x130
__MPYS=0x132
__MAC=0x134
__MACS=0x136
__OP2=0x138
__RESLO=0x13a
__RESHI=0x13c
__SUMEXT=0x13e

        .text
        .p2align 1,0
.global main
        .type   main,@function
/***********************
 * Function `main' 
 ***********************/
main:
/* prologue: frame size = 0 */
.L__FrameSize_main=0x0
.L__FrameOffset_main=0x4
        mov     #(__stack-0), r1
        mov     r1,r4
/* prologue end (size=3) */
        mov     &y, r12
        mov     &y+2, r13
        mov     &y+4, r14
        mov     &y+6, r15
        push    #hhi(600000)
        push    #hlo(600000)
        push    #lhi(600000)
        push    #llo(600000)
        call    #__muldi3
        add     #llo(8), r1
        mov     r12, &x
        mov     r13, &x+2
        mov     r14, &x+4
        mov     r15, &x+6
/* epilogue: frame size=0 */
        br      #__stop_progExec__
/* epilogue end (size=4) */
/* function main size 34 (27) */
.Lfe1:
        .size   main,.Lfe1-main
/********* End of function ******/

        .comm x,8,2
        .comm y,8,2

/*********************************************************************
 * File llong.c: code size: 34 words (0x22)
 * incl. words in prologues: 3, epilogues: 4
 *********************************************************************/

===================================================

The compiler error message:

C:\MSP430 Test\Debug>echo off
llong.c: In function `main':
llong.c:9: warning: return type of `main' is not `int'
C:\WINDOWS\TEMP/ccVLujgb.s: Assembler messages:
C:\WINDOWS\TEMP/ccVLujgb.s:32: Error: value out of range: 600000. use
#lo() or #
hi()
C:\WINDOWS\TEMP/ccVLujgb.s:33: Error: value out of range: 600000. use
#lo() or #
hi()

C:\MSP430 Test\Debug>

Regards

Paul Burke

Reply via email to