Esempio n. 1
0
static void falcon_prep(struct disisa *isa) {
	isa->vardata = vardata_new("falcon");
	int f_fuc0op = vardata_add_feature(isa->vardata, "fuc0op", "v0 exclusive opcodes");
	/* XXX rename variants */
	int f_fuc3op = vardata_add_feature(isa->vardata, "fuc3op", "v3+ opcodes");
	int f_fuc4op = vardata_add_feature(isa->vardata, "fuc4op", "v4+ opcodes");
	int f_crypt = vardata_add_feature(isa->vardata, "crypt", "Cryptographic coprocessor");
	int f_fuc5op = vardata_add_feature(isa->vardata, "fuc5op", "v5+ opcodes");
	int f_fucold = vardata_add_feature(isa->vardata, "fucold", "v0-v4 opcodes");
	if (f_fuc0op == -1 || f_fuc3op == -1 || f_fuc4op == -1 || f_crypt == -1 || f_fuc5op == -1 || f_fucold == -1)
		abort();
	int vs_fucver = vardata_add_varset(isa->vardata, "version", "falcon version");
	if (vs_fucver == -1)
		abort();
	int v_fuc0 = vardata_add_variant(isa->vardata, "fuc0", "falcon v0", vs_fucver);
	int v_fuc3 = vardata_add_variant(isa->vardata, "fuc3", "falcon v3", vs_fucver);
	int v_fuc4 = vardata_add_variant(isa->vardata, "fuc4", "falcon v4", vs_fucver);
	int v_fuc5 = vardata_add_variant(isa->vardata, "fuc5", "falcon v5", vs_fucver);
	if (v_fuc0 == -1 || v_fuc3 == -1 || v_fuc4 == -1 || v_fuc5 == -1)
		abort();
	vardata_variant_feature(isa->vardata, v_fuc0, f_fuc0op);
	vardata_variant_feature(isa->vardata, v_fuc0, f_fucold);
	vardata_variant_feature(isa->vardata, v_fuc3, f_fuc3op);
	vardata_variant_feature(isa->vardata, v_fuc3, f_fucold);
	vardata_variant_feature(isa->vardata, v_fuc4, f_fuc3op);
	vardata_variant_feature(isa->vardata, v_fuc4, f_fucold);
	vardata_variant_feature(isa->vardata, v_fuc4, f_fuc4op);
	vardata_variant_feature(isa->vardata, v_fuc5, f_fuc3op);
	vardata_variant_feature(isa->vardata, v_fuc5, f_fuc4op);
	vardata_variant_feature(isa->vardata, v_fuc5, f_fuc5op);
	if (vardata_validate(isa->vardata))
		abort();
}
Esempio n. 2
0
static void fuc_prep(struct disisa *isa) {
	isa->vardata = vardata_new("fuc");
	int f_fuc0op = vardata_add_feature(isa->vardata, "fuc0op", "v0 exclusive opcodes");
	int f_fuc3op = vardata_add_feature(isa->vardata, "fuc3op", "v3+ opcodes");
	int f_pc24 = vardata_add_feature(isa->vardata, "pc24", "24-bit PC opcodes");
	int f_crypt = vardata_add_feature(isa->vardata, "crypt", "Cryptographic coprocessor");
	if (f_fuc0op == -1 || f_fuc3op == -1 || f_pc24 == -1 || f_crypt == -1)
		abort();
	int vs_fucver = vardata_add_varset(isa->vardata, "fucver", "fµc version");
	if (vs_fucver == -1)
		abort();
	int v_fuc0 = vardata_add_variant(isa->vardata, "fuc0", "fµc v0", vs_fucver);
	int v_fuc3 = vardata_add_variant(isa->vardata, "fuc3", "fµc v3", vs_fucver);
	int v_fuc4 = vardata_add_variant(isa->vardata, "fuc4", "fµc v4", vs_fucver);
	if (v_fuc0 == -1 || v_fuc3 == -1 || v_fuc4 == -1)
		abort();
	vardata_variant_feature(isa->vardata, v_fuc0, f_fuc0op);
	vardata_variant_feature(isa->vardata, v_fuc3, f_fuc3op);
	vardata_variant_feature(isa->vardata, v_fuc4, f_fuc3op);
	vardata_variant_feature(isa->vardata, v_fuc4, f_pc24);
	if (vardata_validate(isa->vardata))
		abort();
}
Esempio n. 3
0
static void hwsq_prep(struct disisa *isa) {
	isa->vardata = vardata_new("hwsq");
	int f_nv41op = vardata_add_feature(isa->vardata, "nv41op", "NV41+ features");
	int f_nv17f = vardata_add_feature(isa->vardata, "nv17f", "NV17:NV50 flags");
	int f_nv41f = vardata_add_feature(isa->vardata, "nv41f", "NV41:NV50 flags");
	if (f_nv41op == -1 || f_nv17f == -1 || f_nv41f == -1)
		abort();
	int vs_chipset = vardata_add_varset(isa->vardata, "chipset", "GPU chipset");
	if (vs_chipset == -1)
		abort();
	int v_nv17 = vardata_add_variant(isa->vardata, "nv17", "NV17:NV41", vs_chipset);
	int v_nv41 = vardata_add_variant(isa->vardata, "nv41", "NV41:NV50", vs_chipset);
	int v_nv50 = vardata_add_variant(isa->vardata, "nv50", "NV50+", vs_chipset);
	if (v_nv17 == -1 || v_nv41 == -1 || v_nv50 == -1)
		abort();
	vardata_variant_feature(isa->vardata, v_nv17, f_nv17f);
	vardata_variant_feature(isa->vardata, v_nv41, f_nv17f);
	vardata_variant_feature(isa->vardata, v_nv41, f_nv41f);
	vardata_variant_feature(isa->vardata, v_nv41, f_nv41op);
	vardata_variant_feature(isa->vardata, v_nv50, f_nv41op);
	if (vardata_validate(isa->vardata))
		abort();
}