File tree 2 files changed +17
-4
lines changed
llvm/lib/Target/Z80/MCTargetDesc
2 files changed +17
-4
lines changed Original file line number Diff line number Diff line change @@ -38,20 +38,28 @@ Z80MCAsmInfoELF::Z80MCAsmInfoELF(const Triple &T) {
38
38
39
39
// Common to both GAS and fasmg
40
40
CommentString = " ;" ;
41
+ AscizDirective = nullptr ;
41
42
Code32Directive = Code64Directive = nullptr ;
42
43
UseIntegratedAssembler = false ;
43
44
AssemblerDialect = !Is16Bit;
44
45
HasFunctionAlignment = false ;
45
46
ExceptionsType = ExceptionHandling::SjLj;
46
47
47
- if (!Z80GasStyle) {
48
+ if (Z80GasStyle) {
49
+ Code16Directive = " .assume\t ADL = 0" ;
50
+ Code24Directive = " .assume\t ADL = 1" ;
51
+ AsciiDirective = ByteListDirective = Data8bitsDirective = " \t db\t " ;
52
+ Data16bitsDirective = " \t dw\t " ;
53
+ Data24bitsDirective = " \t d24\t " ;
54
+ Data32bitsDirective = " \t d32\t " ;
55
+ } else {
48
56
Code16Directive = " assume\t adl = 0" ;
49
57
Code24Directive = " assume\t adl = 1" ;
50
58
DollarIsPC = true ;
51
59
SeparatorString = nullptr ;
52
60
PrivateGlobalPrefix = PrivateLabelPrefix = " " ;
53
61
SupportsQuotedNames = false ;
54
- ZeroDirective = AscizDirective = nullptr ;
62
+ ZeroDirective = nullptr ;
55
63
BlockSeparator = " dup " ;
56
64
AsciiDirective = ByteListDirective = Data8bitsDirective = " \t db\t " ;
57
65
NumberLiteralSyntax = ANLS_PlainDecimal;
Original file line number Diff line number Diff line change @@ -34,8 +34,13 @@ void Z80TargetAsmStreamer::emitLabel(MCSymbol *Symbol) {
34
34
}
35
35
36
36
void Z80TargetAsmStreamer::emitAlign (Align Alignment) {
37
- if (auto Mask = Alignment.value () - 1 )
38
- Z80GasStyle ? OS << " \t .skip\t ($$ - $) and " << Mask << ' \n ' : OS << " \t rb\t ($$ - $) and " << Mask << ' \n ' ;
37
+ if (auto Mask = Alignment.value () - 1 ) {
38
+ if (Z80GasStyle) {
39
+ OS << " \t .balign\t " << Alignment.value () << ' \n ' ;
40
+ } else {
41
+ OS << " \t rb\t ($$ - $) and " << Mask << ' \n ' ;
42
+ }
43
+ }
39
44
}
40
45
41
46
void Z80TargetAsmStreamer::emitBlock (uint64_t NumBytes) {
You can’t perform that action at this time.
0 commit comments