# Copyright (c) 2021-2022 Huawei Device Co., Ltd. # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. definitions: [] tests: - file-name: 'fneg.64' isa: title: Floating-point unary description: > Perform specified floating-point operation on accumulator exceptions: - x_none commands: - file-name: 'op_none' isa: instructions: - sig: fneg.64 acc: inout:f64 format: [op_none] code-template: | # fldai.64 %s fneg.64 fmovi.64 v0, %s fcmpg.64 v0 description: Check fneg.64 with various values. tags: ['tsan', 'irtoc_ignore'] cases: - values: - '0.0' - '0.0' - values: - '-1.0' - '1.0' - values: - '1.0' - '-1.0' - values: - '3.14159265358979323846' - '-3.14159265358979323846' - values: - '-4.9e-300' - '+4.9e-300' - values: - '1.7976931348623157e308' - '-1.7976931348623157e308' - values: - '+4.9e-300' - '-4.9e-300' - values: - '-1.7976931348623157e308' - '+1.7976931348623157e308' - file-name: 'nan' isa: instructions: - sig: fneg.64 acc: inout:f64 format: [op_none] check-type: check-acc-nan-f64 tags: ['irtoc_ignore'] code-template: | # fldai.64 %s fneg.64 description: Check fneg.64 with NaN. cases: - values: # NaN - '0x7ff8000000000000' - values: # NaN - '0xFFFFFFFFFFFFFFFF' - file-name: 'bin_val' isa: instructions: - sig: fneg.64 acc: inout:f64 format: [op_none] tags: ['irtoc_ignore'] code-template: | # fldai.64 %s fneg.64 fmovi.64 v0, %s fcmpg.64 v0 description: Check fneg.64 with various values (HEX literals). cases: - values: # -max - '0xffefffffffffffff' # +max - '0x7fefffffffffffff' - values: # +max - '0x7fefffffffffffff' # -max - '0xffefffffffffffff' - values: # -Inf - '0xfff0000000000000' # +Inf - '0x7ff0000000000000' - values: # +Inf - '0x7ff0000000000000' # -Inf - '0xfff0000000000000' - values: # +min - '0x0000000000000001' # -min - '0x8000000000000001' - values: # -min - '0x8000000000000001' # +min - '0x0000000000000001' - values: # -0.0d - '0x8000000000000000' - '0' - values: - '0' # -0.0d - '0x8000000000000000' - file-name: 'acc_type' isa: verification: - acc_type runner-options: ['verifier-failure', 'verifier-config'] bugid: ['964'] tags: ['verifier'] header-template: [] code-template: | .record T {} .record panda.String .record panda.Object # .function i32 main() { %s fneg.64 check-type: exit-positive description: Check `fneg.64` with incorrect accumulator type. cases: - values: - ldai 1 - values: - fldai 1 bugid: ['6094'] - values: - ldai.64 1 - values: - lda.type T - values: - lda.type T[] - values: - lda.type panda.Object - values: - lda.type panda.String - values: - lda.str "x" - values: - | # newobj v0, T lda.obj v0 - values: - lda.null - values: - | # movi v0, 10 newarr v0, v0, i32[] lda.obj v0 - file-name: uninitialized_regs bugid: ['2787'] tags: ['verifier'] isa: instructions: - sig: fneg.64 acc: inout:f64 format: [op_none] description: Check fneg.64 with uninitialized accumulator. runner-options: ['verifier-failure', 'verifier-config'] header-template: [] code-template: | # .function i32 main() { # acc is undefined fneg.64 check-type: exit-positive