1# Copyright (c) 2021-2022 Huawei Device Co., Ltd. 2# Licensed under the Apache License, Version 2.0 (the "License"); 3# you may not use this file except in compliance with the License. 4# You may obtain a copy of the License at 5# 6# http://www.apache.org/licenses/LICENSE-2.0 7# 8# Unless required by applicable law or agreed to in writing, software 9# distributed under the License is distributed on an "AS IS" BASIS, 10# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 11# See the License for the specific language governing permissions and 12# limitations under the License. 13# 14# The following comment until the empty line must be a valid YAML document 15# containing exact copies of ISA specification assertions relevant to this test. 16#--- 17#- title: Get field from object 18# description: 'Get field value from an object by field id and put it into accumulator. 19# 20#' 21# instructions: 22# - sig: ldobj.64 v:in:ref, field_id 23# acc: out:b64 24# format: 25# - op_v_8_id_32 26 27## runner-option: verifier-failure 28## runner-option: bugid: 1324 29## runner-option: tags: verifier 30 31# Test description: 32# Check that verifier reports error if source registers are not initialized 33 34 35.language PandaAssembly 36 37.record panda.Object <external> 38 39.record Q {} 40.function void Q.ctor(Q a0) { 41 return.void 42} 43 44.record R { 45 u1 fu1 46 u8 fu8 47 i8 fi8 48 u16 fu16 49 i16 fi16 50 u32 fu32 51 i32 fi32 52 u64 fu64 53 i64 fi64 54 f32 ff32 55 f64 ff64 56 57 i32[] fi32Array 58 Q fQ 59 Q[] fQArray 60 panda.Object fObj 61 panda.Object[] fObjArray 62} 63.function void R.ctor(R a0) { 64 return.void 65} 66 67.function i32 main() { 68 ldobj.64 v0, R.fu64 # verifier error expected, because the register is not initialized 69# 70 ldai 0 71 return 72} 73