From a1ddeade2cb4fbd71bf224defae5b62e1adc7d80 Mon Sep 17 00:00:00 2001 From: Matthew Flatt Date: Sat, 6 Jun 2020 17:57:39 -0600 Subject: [PATCH] suppress time-stamp-counter test for arm32le original commit: 990f051353979049415c29af503556c5b82296e9 --- mats/misc.ms | 53 ++++++++++++++++++++++++++-------------------------- 1 file changed, 27 insertions(+), 26 deletions(-) diff --git a/mats/misc.ms b/mats/misc.ms index d74521334d..d5d9826d02 100644 --- a/mats/misc.ms +++ b/mats/misc.ms @@ -4694,34 +4694,35 @@ (#2%display 1)))) ) -(mat $read-time-stamp-counter +(unless (memq (machine-type) '(arm32le tarm32le)) ; timestamp counter tends to be priviledged on arm32le + (mat $read-time-stamp-counter - (let ([t (#%$read-time-stamp-counter)]) - (and (integer? t) (exact? t))) + (let ([t (#%$read-time-stamp-counter)]) + (and (integer? t) (exact? t))) - (let () - ;; NB: pulled from thread.ms, to use as a delay - (define fat+ - (lambda (x y) - (if (zero? y) - x - (fat+ (1+ x) (1- y))))) - (define fatfib - (lambda (x) - (if (< x 2) - 1 - (fat+ (fatfib (1- x)) (fatfib (1- (1- x))))))) - (let loop ([count 10] [success 0]) - (if (fx= count 0) - (>= success 9) - (let ([t0 (#%$read-time-stamp-counter)]) - (fatfib 26) - (let ([t1 (#%$read-time-stamp-counter)]) - (loop (fx- count 1) - (if (< t0 t1) - (fx+ success 1) - success))))))) -) + (let () + ;; NB: pulled from thread.ms, to use as a delay + (define fat+ + (lambda (x y) + (if (zero? y) + x + (fat+ (1+ x) (1- y))))) + (define fatfib + (lambda (x) + (if (< x 2) + 1 + (fat+ (fatfib (1- x)) (fatfib (1- (1- x))))))) + (let loop ([count 10] [success 0]) + (if (fx= count 0) + (>= success 9) + (let ([t0 (#%$read-time-stamp-counter)]) + (fatfib 26) + (let ([t1 (#%$read-time-stamp-counter)]) + (loop (fx- count 1) + (if (< t0 t1) + (fx+ success 1) + success))))))) + )) (mat procedure-arity-mask (equal? (procedure-arity-mask (lambda () #f)) 1)