target/loongarch: Add loongarch vector property unconditionally
Currently LSX/LASX vector property is decided by the default value. Instead vector property should be added unconditionally, and it is irrelative with its default value. If vector is disabled by default, vector also can be enabled from command line. Signed-off-by: Bibo Mao <maobibo@loongson.cn> Reviewed-by: Song Gao <gaosong@loongson.cn> Message-Id: <20240521080549.434197-2-maobibo@loongson.cn> Signed-off-by: Song Gao <gaosong@loongson.cn>
This commit is contained in:
parent
ac551dbd58
commit
f83434f3dc
@ -645,17 +645,11 @@ static void loongarch_set_lasx(Object *obj, bool value, Error **errp)
|
||||
|
||||
void loongarch_cpu_post_init(Object *obj)
|
||||
{
|
||||
LoongArchCPU *cpu = LOONGARCH_CPU(obj);
|
||||
|
||||
if (FIELD_EX32(cpu->env.cpucfg[2], CPUCFG2, LSX)) {
|
||||
object_property_add_bool(obj, "lsx", loongarch_get_lsx,
|
||||
loongarch_set_lsx);
|
||||
}
|
||||
if (FIELD_EX32(cpu->env.cpucfg[2], CPUCFG2, LASX)) {
|
||||
object_property_add_bool(obj, "lasx", loongarch_get_lasx,
|
||||
loongarch_set_lasx);
|
||||
}
|
||||
}
|
||||
|
||||
static void loongarch_cpu_init(Object *obj)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user