Skip to content

Commit 6d0e300

Browse files
main/mbar: complete hex2decPlMi match
1 parent 5252253 commit 6d0e300

File tree

3 files changed

+31
-25
lines changed

3 files changed

+31
-25
lines changed

config/p3.jul12.symbol_addrs.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2402,6 +2402,7 @@ exit = 0x00169730; // type:func
24022402
__fixsfdi = 0x00169760; // type:func
24032403
__floatdisf = 0x00169a20; // type:func
24042404
__muldi3 = 0x0016a168; // type:func
2405+
__moddi3 = 0x00169b00; // type:func
24052406
__udivdi3 = 0x0016a1c8; // type:func
24062407
__umoddi3 = 0x0016a798; // type:func
24072408

progress/report.json

Lines changed: 17 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
{
22
"measures": {
3-
"fuzzy_match_percent": 48.65813,
3+
"fuzzy_match_percent": 48.71773,
44
"total_code": "342284",
5-
"matched_code": "163360",
6-
"matched_code_percent": 47.726448,
5+
"matched_code": "163564",
6+
"matched_code_percent": 47.78605,
77
"total_data": "26082796",
88
"matched_data": "26033144",
99
"matched_data_percent": 99.80963,
1010
"total_functions": 1429,
11-
"matched_functions": 1003,
12-
"matched_functions_percent": 70.18894,
11+
"matched_functions": 1004,
12+
"matched_functions_percent": 70.25892,
1313
"total_units": 70
1414
},
1515
"units": [
@@ -3966,14 +3966,14 @@
39663966
{
39673967
"name": "main/mbar",
39683968
"measures": {
3969-
"fuzzy_match_percent": 54.849854,
3969+
"fuzzy_match_percent": 56.205154,
39703970
"total_code": "15052",
3971-
"matched_code": "8256",
3972-
"matched_code_percent": 54.84985,
3971+
"matched_code": "8460",
3972+
"matched_code_percent": 56.205154,
39733973
"total_data": "224",
39743974
"total_functions": 82,
3975-
"matched_functions": 64,
3976-
"matched_functions_percent": 78.048775,
3975+
"matched_functions": 65,
3976+
"matched_functions_percent": 79.268295,
39773977
"total_units": 1
39783978
},
39793979
"sections": [
@@ -3995,7 +3995,7 @@
39953995
{
39963996
"name": ".text",
39973997
"size": "15208",
3998-
"fuzzy_match_percent": 54.849854,
3998+
"fuzzy_match_percent": 56.205154,
39993999
"metadata": {}
40004000
}
40014001
],
@@ -4260,6 +4260,7 @@
42604260
{
42614261
"name": "hex2decPlMi",
42624262
"size": "204",
4263+
"fuzzy_match_percent": 100.0,
42634264
"metadata": {},
42644265
"address": "5368"
42654266
},
@@ -13211,16 +13212,16 @@
1321113212
{
1321213213
"id": "main",
1321313214
"measures": {
13214-
"fuzzy_match_percent": 66.531494,
13215+
"fuzzy_match_percent": 66.69596,
1321513216
"total_code": "124036",
13216-
"matched_code": "81680",
13217-
"matched_code_percent": 65.85185,
13217+
"matched_code": "81884",
13218+
"matched_code_percent": 66.01632,
1321813219
"total_data": "66144",
1321913220
"matched_data": "56300",
1322013221
"matched_data_percent": 85.117325,
1322113222
"total_functions": 570,
13222-
"matched_functions": 495,
13223-
"matched_functions_percent": 86.84211,
13223+
"matched_functions": 496,
13224+
"matched_functions_percent": 87.01754,
1322413225
"total_units": 17
1322513226
}
1322613227
},

src/main/mbar.c

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -644,9 +644,6 @@ static void ExamDispOn(void) {
644644

645645
INCLUDE_ASM("asm/nonmatchings/main/mbar", hex2dec_mbar_tmp);
646646

647-
#ifndef NON_MATCHING
648-
INCLUDE_ASM("asm/nonmatchings/main/mbar", hex2decPlMi);
649-
#else
650647
static u_long hex2decPlMi(long data) {
651648
u_long ret;
652649
int i;
@@ -658,17 +655,24 @@ static u_long hex2decPlMi(long data) {
658655
}
659656
plmichar = data < 1 ? 0 : 10;
660657
if (data < 0) {
661-
plmichar = 11;
662658
data *= -1;
659+
plmichar = 11;
663660
}
664-
for (i = 0; i < 16u && data; i++) {
665-
ret |= (data % 10) << (i * 4);
666-
data /= 10;
661+
i = 0;
662+
if (data == 0) {
663+
ret = plmichar;
664+
} else {
665+
while (data) {
666+
ret |= (data % 10) << (i * 4);
667+
data /= 10;
668+
if (++i >= 16u) {
669+
return ret;
670+
}
671+
}
672+
ret |= plmichar << (i * 4);
667673
}
668-
ret |= plmichar << (i * 4);
669674
return ret;
670675
}
671-
#endif
672676

673677
void examNumDisp(sceGifPacket *ex_gif_pp, long score, short x, short y, int keta, u_char *coldat_pp, int plmi) {
674678
int i;

0 commit comments

Comments
 (0)