Update tests and CPU detection for Blink

This commit is contained in:
Justine Tunney 2023-01-18 00:56:09 -08:00
parent be3e109309
commit 006c44ff5d
No known key found for this signature in database
GPG key ID: BE714B4575D6E328
24 changed files with 206 additions and 56 deletions

View file

@ -150,7 +150,7 @@ static int GetAfd(struct Machine *m, int fd) {
}
static const char *GetSimulated(void) {
if (IsGenuineCosmo() || IsGenuineBlink()) {
if (IsGenuineBlink()) {
return " SIMULATED";
} else {
return "";

View file

@ -47,8 +47,7 @@ void ThrowSegmentationFault(struct Machine *m, int64_t va) {
WARNF("%s%s ADDR %012lx IP %012lx AX %lx CX %lx DX %lx BX %lx SP %lx "
"BP %lx SI %lx DI %lx R8 %lx R9 %lx R10 %lx R11 %lx R12 %lx R13 %lx "
"R14 %lx R15 %lx",
"SEGMENTATION FAULT",
IsGenuineCosmo() || IsGenuineBlink() ? " SIMULATED" : "", va, m->ip,
"SEGMENTATION FAULT", IsGenuineBlink() ? " SIMULATED" : "", va, m->ip,
Read64(m->ax), Read64(m->cx), Read64(m->dx), Read64(m->bx),
Read64(m->sp), Read64(m->bp), Read64(m->si), Read64(m->di),
Read64(m->r8), Read64(m->r9), Read64(m->r10), Read64(m->r11),

View file

@ -205,6 +205,8 @@
"__weak__"
"__vector_size__"
"__ms_abi__"
"__sysv_abi__"
"systemfive"
"__mode__"
"__seg_fs"
"__seg_gs"))

View file

@ -41,7 +41,9 @@
"__code_model_medium__"))
(cpp92
'("__BYTE_ORDER__"
'("__SEG_FS"
"__SEG_GS"
"__BYTE_ORDER__"
"__ORDER_LITTLE_ENDIAN__"
"__ORDER_BIG_ENDIAN__"
"__ORDER_PDP_ENDIAN__"

View file

@ -637,7 +637,7 @@ static void DropOutput(void) {
}
static bool ShouldAvoidGzip(void) {
return IsGenuineCosmo() || (IsGenuineBlink() && !X86_HAVE(JIT));
return (IsGenuineBlink() && !X86_HAVE(JIT));
}
static char *MergePaths(const char *p, size_t n, const char *q, size_t m,
@ -7266,7 +7266,7 @@ static void GetOpts(int argc, char *argv[]) {
int opt;
bool storeasset = false;
// only generate ecp cert under blinkenlights (rsa is slow)
norsagen = IsGenuineCosmo() || IsGenuineBlink();
norsagen = IsGenuineBlink();
while ((opt = getopt(argc, argv, GETOPTS)) != -1) {
switch (opt) {
CASE('S', ++sandboxed);