Tweak GCC Pragmas

This commit is contained in:
Matt Harlum 2025-01-03 10:08:27 +00:00
parent e15fdd1f50
commit 04af3bd24c
3 changed files with 7 additions and 3 deletions

2
ata.c
View File

@ -524,6 +524,7 @@ bool ata_set_multiple(struct IDEUnit *unit, BYTE multiple) {
return 0;
}
#pragma GCC push_options
#pragma GCC optimize ("-O3")
/**
@ -816,6 +817,7 @@ static BYTE write_taskfile_lba48(struct IDEUnit *unit, UBYTE command, ULONG lba,
return 0;
}
#pragma GCC pop_options
/**
* ata_set_pio

View File

@ -318,6 +318,7 @@ done:
return ret;
}
#pragma GCC push_options
#pragma GCC optimize ("-O3")
/**
@ -499,7 +500,7 @@ end:
Trace("exit atapi_packet\n");
return ret;
}
#pragma GCC reset_options
#pragma GCC pop_options
/**
* atapi_test_unit_ready

View File

@ -1,5 +1,6 @@
#ifndef _BLOCK_COPY_H
#define _BLOCK_COPY_H
#pragma GCC push_options
#pragma GCC optimize ("-fomit-frame-pointer")
/**
* ata_read_long_movem
@ -68,7 +69,7 @@ static inline void ata_write_long_movem (void *source, void *destination) {
*/
static inline void ata_read_long_move (void *source, void *destination) {
asm volatile (
"move.l #3,d0 \n\t"
"moveq.l #3,d0 \n\t"
".l1: \n\t"
".rept 32 \n\t"
"move.l (%0),(%1)+ \n\t"
@ -100,5 +101,5 @@ static inline void ata_write_long_move (void *source, void *destination) {
);
}
#pragma GCC reset_options
#pragma GCC pop_options
#endif