#3 --xstack and C-support functions

closed
Maarten Brock
None
1
2004-10-19
2001-08-21
Bernhard Held
No

compile with --xstack:

extern f2 (int c, int d);

f (int a)
{
f2 (3, a); // OK : parameter on xstack
return 3 * a; // BUG: parameter in DSEG
}

The 2nd parameter of _mulsint is written to DSEG
instead of xstack. (I don't need --xstack at all, but
I want to show, that there's a problem.)

Discussion

  • Bernhard Held
    Bernhard Held
    2001-08-21

    • priority: 5 --> 1
     
  • Johan Knol
    Johan Knol
    2002-01-15

    • labels: 101550 -->
     
  • Maarten Brock
    Maarten Brock
    2004-06-02

    Logged In: YES
    user_id=888171

    This one has nothing to do with --xstack (anymore?). The
    xstack behaviour is correct. But if you compile it with --stack-
    auto the problem shows itself as mentioned.

    I moved this one to the bug list as this is no feature request,
    but a bug in my opinion.

    Maarten

     
  • Maarten Brock
    Maarten Brock
    2004-06-02

    Logged In: YES
    user_id=888171

    Stupid me. The option --int-long-reent is for this situation.
    And when that is used everything turns out just fine. So no
    bug here, not even a feature request.

    Or is there...? Shouldn't we assume that when --stack-auto
    is used, --int-long-reent and --float-reent are meant as well?
    And why not build the libraries not only in small and large, but
    also in small-reentrant and large-reentrant versions?

    Anyway, moved this back to the feature requests.
    Maarten

     
  • Maarten Brock
    Maarten Brock
    2004-10-19

    Logged In: YES
    user_id=888171

    SDCC 2.4.6 assumes --int-long-reent and --float-reent
    when --stack-auto is used.

     
  • Maarten Brock
    Maarten Brock
    2004-10-19

    • assigned_to: nobody --> maartenbrock
    • status: open --> closed