OSDN Git Service

target/loongarch: Allow user enable/disable LSX/LASX features
authorSong Gao <gaosong@loongson.cn>
Fri, 20 Oct 2023 08:49:24 +0000 (16:49 +0800)
committerSong Gao <gaosong@loongson.cn>
Fri, 3 Nov 2023 06:13:02 +0000 (14:13 +0800)
commit464136ceb65ddebbd60fecd486628cc82fd722ab
treee4e1c2403356169ecbe007ba25b7c77be0f861c0
parentd6f077321ae3f9508d3e066455ae1278ab3213e5
target/loongarch: Allow user enable/disable LSX/LASX features

Some users may not need LSX/LASX, this patch allows the user
enable/disable LSX/LASX features.

 e.g
 '-cpu max,lsx=on,lasx=on'   (default);
 '-cpu max,lsx=on,lasx=off'  (enabled LSX);
 '-cpu max,lsx=off,lasx=on'  (enabled LASX, LSX);
 '-cpu max,lsx=off'          (disable LSX and LASX).

Signed-off-by: Song Gao <gaosong@loongson.cn>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20231020084925.3457084-3-gaosong@loongson.cn>
target/loongarch/cpu.c
target/loongarch/cpu.h