X-Git-Url: https://git.gag.com/?a=blobdiff_plain;ds=sidebyside;f=src%2Favr%2Fmain.c;h=9f5a4fcd1c33aa3102cf466e3839057ee90bf9da;hb=3e6a1de6a8b8e4031ce47445eb9bebed88a283b7;hp=73eb0ba6b652aca3a3d71016bb6b62affcff3b48;hpb=856b88b89030bb496aaf9e21e39d98e5b48b9869;p=fw%2Fsdcc diff --git a/src/avr/main.c b/src/avr/main.c index 73eb0ba6..9f5a4fcd 100644 --- a/src/avr/main.c +++ b/src/avr/main.c @@ -131,6 +131,29 @@ _avr_genIVT (FILE * of, symbol ** interrupts, int maxInterrupts) return TRUE; } +/* Indicate which extended bit operations this port supports */ +static bool +hasExtBitOp (int op, int size) +{ + if (op == RRC + || op == RLC + || op == GETHBIT + ) + return TRUE; + else + return FALSE; +} + +/* Indicate the expense of an access to an output storage class */ +static int +oclsExpense (struct memmap *oclass) +{ + if (IN_FARSPACE(oclass)) + return 1; + + return 0; +} + /** $1 is always the basename. $2 is always the output file. $3 varies @@ -153,9 +176,11 @@ PORT avr_port = { "ATMEL AVR", /* Target name */ NULL, /* processor */ { + glue, TRUE, /* Emit glue around main */ MODEL_LARGE | MODEL_SMALL, - MODEL_SMALL}, + MODEL_SMALL + }, { _asmCmd, NULL, @@ -169,7 +194,8 @@ PORT avr_port = { _linkCmd, NULL, NULL, - ".rel"}, + ".rel", + 1}, { _defaultRules}, { @@ -201,10 +227,14 @@ PORT avr_port = { { 1, -1 }, + { + avr_emitDebuggerSymbol + }, "_", _avr_init, _avr_parseOptions, NULL, + NULL, _avr_finaliseOptions, _avr_setDefaultOptions, avr_assignRegisters, @@ -214,12 +244,16 @@ PORT avr_port = { NULL, /* no genAssemblerEnd */ _avr_genIVT, NULL, // _avr_genXINIT + NULL, /* genInitStartup */ _avr_reset_regparm, _avr_regparm, NULL, NULL, NULL, + hasExtBitOp, /* hasExtBitOp */ + oclsExpense, /* oclsExpense */ FALSE, + TRUE, /* little endian */ 0, /* leave lt */ 1, /* transform gt ==> not le */ 0, /* leave le */