switch (in_type_sel1) {
case 1: in_type1 = PSE_PAD_TYPE_ANALOGPAD; break;
- case 2: in_type1 = PSE_PAD_TYPE_GUNCON; break;
+ case 2: in_type1 = PSE_PAD_TYPE_NEGCON; break;
default: in_type1 = PSE_PAD_TYPE_STANDARD;
}
switch (in_type_sel2) {
case 1: in_type2 = PSE_PAD_TYPE_ANALOGPAD; break;
- case 2: in_type2 = PSE_PAD_TYPE_GUNCON; break;
+ case 2: in_type2 = PSE_PAD_TYPE_NEGCON; break;
default: in_type2 = PSE_PAD_TYPE_STANDARD;
}
if (in_evdev_allow_abs_only != allow_abs_only_old) {
len = size - 1;
strncpy(d, s, len);
d[len] = 0;
-
- mystrip(d);
}
static void keys_write_all(FILE *f)
while (p != NULL && (p = strstr(p, "binddev = ")) != NULL) {
p += 10;
+ // don't strip 'dev' because there are weird devices
+ // with names with space at the end
get_line(dev, sizeof(dev), p);
+
dev_id = in_config_parse_dev(dev);
if (dev_id < 0) {
printf("input: can't handle dev: %s\n", dev);
#endif
#include "arm_features.h"
-#if !BASE_ADDR_FIXED
+#ifdef VITA
+char* translation_cache = 0;
+#elif !BASE_ADDR_FIXED
char translation_cache[1 << TARGET_SIZE_2] __attribute__((aligned(4096)));
#endif
}else if(genimm(-imm,&armval)) {
assem_debug("sub %s,%s,#%d\n",regname[rt],regname[rs],-imm);
output_w32(0xe2400000|rd_rn_rm(rt,rs,0)|armval);
- }else if(imm<0) {
- assert(imm>-65536);
+ #ifdef HAVE_ARMV7
+ }else if(rt!=rs&&(u_int)imm<65536) {
+ emit_movw(imm&0x0000ffff,rt);
+ emit_add(rs,rt,rt);
+ }else if(rt!=rs&&(u_int)-imm<65536) {
+ emit_movw(-imm&0x0000ffff,rt);
+ emit_sub(rs,rt,rt);
+ #endif
+ }else if((u_int)-imm<65536) {
assem_debug("sub %s,%s,#%d\n",regname[rt],regname[rs],(-imm)&0xFF00);
assem_debug("sub %s,%s,#%d\n",regname[rt],regname[rt],(-imm)&0xFF);
output_w32(0xe2400000|rd_rn_imm_shift(rt,rs,(-imm)>>8,8));
output_w32(0xe2400000|rd_rn_imm_shift(rt,rt,(-imm)&0xff,0));
- }else{
- assert(imm<65536);
- assem_debug("add %s,%s,#%d\n",regname[rt],regname[rs],imm&0xFF00);
- assem_debug("add %s,%s,#%d\n",regname[rt],regname[rt],imm&0xFF);
- output_w32(0xe2800000|rd_rn_imm_shift(rt,rs,imm>>8,8));
- output_w32(0xe2800000|rd_rn_imm_shift(rt,rt,imm&0xff,0));
+ }else {
+ do {
+ int shift = (ffs(imm) - 1) & ~1;
+ int imm8 = imm & (0xff << shift);
+ genimm_checked(imm8,&armval);
+ assem_debug("add %s,%s,#0x%x\n",regname[rt],regname[rs],imm8);
+ output_w32(0xe2800000|rd_rn_rm(rt,rs,0)|armval);
+ rs = rt;
+ imm &= ~imm8;
+ }
+ while (imm != 0);
}
}
else if(rs!=rt) emit_mov(rs,rt);