From: Luke Kenneth Casson Leighton Date: Fri, 9 Oct 2020 10:32:35 +0000 (+0100) Subject: change undefined to be a function X-Git-Tag: convert-csv-opcode-to-binary~2037 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=d8d58a50a16d7f025bb7d18c1b8727c9131c467d;p=libreriscv.git change undefined to be a function this therefore "tags" locations in the spec with a red flag that need replacing with exact (non-undefined) behaviour --- diff --git a/openpower/isa/fixedarith.mdwn b/openpower/isa/fixedarith.mdwn index 9d7bcf78d..0e0ebf68d 100644 --- a/openpower/isa/fixedarith.mdwn +++ b/openpower/isa/fixedarith.mdwn @@ -389,11 +389,11 @@ Pseudo-code: if (((dividend = 0x8000_0000) & (divisor = 0xffff_ffff)) | (divisor = 0x0000_0000)) then - RT[0:63] <- undef([0]*64) + RT[0:63] <- undefined([0]*64) overflow <- 1 else RT[32:63] <- DIVS(dividend, divisor) - RT[0:31] <- undef([0]*32) + RT[0:31] <- undefined([0]*32) overflow <- 0 Special Registers Altered: @@ -416,10 +416,10 @@ Pseudo-code: divisor[0:31] <- (RB)[32:63] if divisor != 0 then RT[32:63] <- dividend / divisor - RT[0:31] <- undef([0]*32) + RT[0:31] <- undefined([0]*32) overflow <- 0 else - RT[0:63] <- undef([0]*64) + RT[0:63] <- undefined([0]*64) overflow <- 1 Special Registers Altered: @@ -449,12 +449,12 @@ Pseudo-code: result32[0:63] <- EXTS64(result[32:63]) if (result32 = result) then RT[32:63] <- result[32:63] - RT[0:31] <- undef([0]*32) + RT[0:31] <- undefined([0]*32) overflow <- 0 else overflow <- 1 if overflow = 1 then - RT[0:63] <- undef([0]*64) + RT[0:63] <- undefined([0]*64) Special Registers Altered: @@ -480,12 +480,12 @@ Pseudo-code: result <- dividend / divisor if RA[32:63] 0 if i = 32 then r <- (r + 1) % 32 diff --git a/openpower/isa/system.mdwn b/openpower/isa/system.mdwn index 2d6d6173f..df853c143 100644 --- a/openpower/isa/system.mdwn +++ b/openpower/isa/system.mdwn @@ -28,8 +28,8 @@ SC-Form Pseudo-code: LR <- CIA + 4 - SRR1[33:36] <- undefined - SRR1[42:47] <- undefined + SRR1[33:36] <- undefined([0]*4) + SRR1[42:47] <- undefined([0]*6) SRR1[0:32] <- MSR[0:32] SRR1[37:41] <- MSR[37:41] SRR1[48:63] <- MSR[48:63]