summaryrefslogtreecommitdiff
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* slabeldef is not needed for C strings in GAS formatHEADmasterXavi Del Campo2019-11-101-1/+1
|
* Fixed pdk15 lib buildingXavi Del Campo2019-11-071-1/+1
|
* Removed intermediate filesXavi Del Campo2019-11-062-382/+0
|
* Fixed github sdcc-gas issues #1, #2 and #4Xavi Del Campo2019-11-0610-82/+99
| | | | | | | | | | | | | | | | | | | Issue #1 was caused because code_name and data_name had been incorrectly defined as const-qualified pointers, but this must be an exception for the z80 backend, as stated by the comments. Issue #2 has been solved by removing the --gas switch from SDCCmain.c, renaming it to "--asm=" (as requested by PKK) and moved to STM8's main.c, so the option is limited to those targets supporting it. Issue #4 was because of SDCCglue.c, that generated local labels using "!labeldef" instead of "!slabeldef", causing those __str_%d labels to be printed as "__str_%d::" (the double colons stand for globa label according to asxxx documentation) instead of "__str_%d":". I ran the regression tests and most of them passed, but "wchar" returned another "Multiple definition of..." error that I cannot explain so far. It is better than nothing, though.
* Removed intermediate filesXavi Del Campo2019-11-0510-105/+381
|
* _Noreturn-qualified functions now do not generate any ret/iret instructionXavier ASUS2019-10-301-21/+31
|
* BugfixesXavier ASUS2019-10-301-2/+8
|
* First implementation for --data-sectionsXavier ASUS2019-10-283-9/+36
| | | | | | OTOH, section names included in "options" were being assigned *before* parsing command line arguments. These arose some issues so I have created a post-parsing function.
* Bugfixes on startup routineXavier ASUS2019-10-251-8/+16
| | | | Memory addresses should be preceded by '#' when referring to them as integers
* Removed unneded "== ." directives for --gasXavier ASUS2019-10-252-9/+7
|
* DWARF2 debugging (almost) workingXavier ASUS2019-10-255-49/+47
| | | | | Stack pointer setup is removed since it is already set to 0x3FF for the STM8S003F3/K3, according to the datasheet.
* Removed intermediate filesXavier ASUS2019-10-2410-435/+0
|
* Got hi8/lo8 asm instructions workingXavier ASUS2019-10-244-9/+42
| | | | | | | | | | | | GNU as does not support the #</#> notation asxxx uses to determine address LSB and MSB. Instead, two instructions have been created on GNU as and ld (see my stm8-binutils-gdb fork) for this purpose. On the other hand, I'm upset to see gen.c does not provide an assembler-agnostic implementation when SDCCasm.c already provides tools already meant for this. OTOH, support for the "-C" has been added for --gas.
* Implemented -c support for --gasXavier ASUS2019-10-236-20/+45
| | | | | | | | | | | | STM8 code generator was generating some instructions in a "ld register, (#%d, register)" way, causing assembling errors on stm8-as. This is because stm8-as does not require the '#' character. A quick and dirty workaround has been implemented for this. Added new warning W_IGNORED_OPT_IN_ASM, which warns the user when both "--no-optsdcc-in-asm" and "--gas" are used (the first is ignored when the latter is active since GNU as does not accept the .optsdcc directive, as opposed to asxxx).
* Ignored options.const_seg and initializer->snameXavier ASUS2019-10-222-3/+4
| | | | options.gasOutput is not defined yet when these options above are assigned, so they hold invalid values.
* .data symbols are now allocated correctlyXavier ASUS2019-10-222-19/+19
| | | | | | .data only needs a label with the smybol name and .byte/.word directives defining it. Therefore, INITIALIZED_NAME is ignored since no allocation must be done from emitRegularMap() for .data.
* First working example!Xavier ASUS2019-10-229-50/+60
| | | | | | stm8/main.c: 0x8000 must contain the entry point aka "_start" for GNU as. Some work on supporting debugging symbols with --gas. Not finished yet.
* Removed unneeded module SDCCgasXavier ASUS2019-10-212-253/+0
| | | | | | It was an experimental attempt to implement GNU as support, but it was deprecated in favor of ad-hoc workarounds and using SDCC cross-assembler capabilities.
* Implemented --ffunction-sectionsXavier ASUS2019-10-215-47/+55
| | | | | | | Interrupt vector must be placed on section .vectors, according to the default linker script file. Intermediate labels must be $-terminated so they are not listed by nm.
* GNU as now assembles successfullyXavier ASUS2019-10-212-39/+70
| | | | | A new (untested) startup routine has been written for GNU as. Section names have been considered from stm8-binutils linker script.
* More work on GNU as generationXavier ASUS2019-10-2113-104/+179
| | | | | | | | | | | | | | | | | | On _gas_mapping, label definitions do not allow "::". ":" must be used instead. gasOutput is now part of "options". Unneeded sections, such as HOME/GSINIT/etc., are no longer declared and/or defined. GNU as just does not need them. Startup function name must equal "_start" for GNU ld. The value of some macros, such as CODE_NAME or DATA_NAME, must change according to options.gasOutput, as "CODE" or "DATA" (among many others) are not understood by GNU as. STM8 port now selects GNU as format on --gas switch enabled.
* Creating GAS port in SDCCasmXavier ASUS2019-10-192-45/+48
| | | | | | SDCCasm proved a much more elegant way to implement GAS support for SDCC. In fact, I was surprised to see there was already an attempt that had been commented out. stm8-as only complaints about those nasty "Smain ==." statements, but that should be easy to fix.
* SDCCgas: work on emitting .rodata sectionXavier ASUS2019-10-191-5/+92
|
* sdcc-3.9.0 fork implementing GNU assembler syntaxXavier ASUS2019-10-18297-0/+268119
This fork aims to provide better support for stm8-binutils