weimingz (Weiming Zhao)
User

Projects

User does not belong to any projects.
User Since
Nov 19 2012, 2:50 AM (226 w, 6 d)

Recent Activity

Fri, Mar 24

weimingz added inline comments to D31220: [builtins][ARM] Select correct code fragments when compiling for Thumb1/Thum2/ARM ISA.
Fri, Mar 24, 10:27 AM
weimingz committed rL298715: Revert "builtins: Select correct code fragments when compiling for….
Revert "builtins: Select correct code fragments when compiling for…
Fri, Mar 24, 10:20 AM
weimingz committed rL298714: [Compiler-rt][Builtins] Implement lit-test support (part 2 of 2).
[Compiler-rt][Builtins] Implement lit-test support (part 2 of 2)
Fri, Mar 24, 10:18 AM
weimingz committed rL298713: builtins: Select correct code fragments when compiling for Thumb1/Thum2/ARM ISA..
builtins: Select correct code fragments when compiling for Thumb1/Thum2/ARM ISA.
Fri, Mar 24, 10:18 AM
weimingz closed D31259: [Compiler-rt][Builtins] Implement lit-test support (part 2 of 2) by committing rL298714: [Compiler-rt][Builtins] Implement lit-test support (part 2 of 2).
Fri, Mar 24, 10:18 AM
weimingz closed D30938: builtins: Select correct code fragments when compiling for Thumb1/Thum2/ARM ISA. by committing rL298713: builtins: Select correct code fragments when compiling for Thumb1/Thum2/ARM ISA..
Fri, Mar 24, 10:18 AM

Thu, Mar 23

weimingz added a comment to D31259: [Compiler-rt][Builtins] Implement lit-test support (part 2 of 2).

It's part of already-accepted patch ((https://reviews.llvm.org/D30802)
Will re-land it.

Thu, Mar 23, 11:05 PM

Wed, Mar 22

weimingz updated the diff for D31259: [Compiler-rt][Builtins] Implement lit-test support (part 2 of 2).

need to include builtin-config-ix to get the right ARM32 variable.

Wed, Mar 22, 3:24 PM
weimingz added a comment to D31259: [Compiler-rt][Builtins] Implement lit-test support (part 2 of 2).

This patch *should* address the issue of buildbot of powerpc (http://lab.llvm.org:8011/builders/sanitizer-ppc64le-linux/builds/1703).
I was using

set(BUILTINS_TEST_ARCH ${COMPILER_RT_SUPPORTED_ARCH})

It should be

set(BUILTINS_TEST_ARCH ${BUILTIN_SUPPORTED_ARCH})
Wed, Mar 22, 1:58 PM
weimingz created D31259: [Compiler-rt][Builtins] Implement lit-test support (part 2 of 2).
Wed, Mar 22, 1:56 PM
weimingz added inline comments to D31220: [builtins][ARM] Select correct code fragments when compiling for Thumb1/Thum2/ARM ISA.
Wed, Mar 22, 12:37 PM

Tue, Mar 21

weimingz added a comment to D30938: builtins: Select correct code fragments when compiling for Thumb1/Thum2/ARM ISA..

Hi Michal,

Tue, Mar 21, 4:13 PM
weimingz created D31220: [builtins][ARM] Select correct code fragments when compiling for Thumb1/Thum2/ARM ISA.
Tue, Mar 21, 4:10 PM

Mon, Mar 20

weimingz committed rL298339: [Builtin] Implement lit-test support (part 1 of 2: test cases update).
[Builtin] Implement lit-test support (part 1 of 2: test cases update)
Mon, Mar 20, 10:46 PM
weimingz closed D30802: [Builtin] Implement lit-test support (part 1 of 2: test cases update) by committing rL298339: [Builtin] Implement lit-test support (part 1 of 2: test cases update).
Mon, Mar 20, 10:45 PM
weimingz updated the summary of D30802: [Builtin] Implement lit-test support (part 1 of 2: test cases update).
Mon, Mar 20, 10:35 PM
weimingz updated the diff for D30802: [Builtin] Implement lit-test support (part 1 of 2: test cases update).

I split the original patch into 2 parts: This one only contains the test case updates: adding "RUN" or "UNSUPPORT". A couple of test cases are XFAILed for armhf/aarch64 target (bugs were opened [1,2]). This part is also safe to commit; The second part will includes the CMake, lit.cfg files for easy reviewing.

Mon, Mar 20, 10:22 PM
weimingz added inline comments to D30938: builtins: Select correct code fragments when compiling for Thumb1/Thum2/ARM ISA..
Mon, Mar 20, 3:53 PM

Tue, Mar 14

weimingz added a comment to D30872: [Builtin][AArch64] Fix build errors of test cases.

(sorry, please ignore the update)

Tue, Mar 14, 10:08 PM
weimingz reopened D30802: [Builtin] Implement lit-test support (part 1 of 2: test cases update).
Tue, Mar 14, 10:07 PM
weimingz updated the diff for D30802: [Builtin] Implement lit-test support (part 1 of 2: test cases update).

XFAIL some of the tests for armhf and aarch64.
See https://bugs.llvm.org//show_bug.cgi?id=32260 and https://bugs.llvm.org//show_bug.cgi?id=32261

Tue, Mar 14, 10:07 PM
weimingz updated the diff for D30872: [Builtin][AArch64] Fix build errors of test cases.
Tue, Mar 14, 10:04 PM

Mon, Mar 13

weimingz committed rL297697: [Builtin][AArch64] Fix build errors of test cases.
[Builtin][AArch64] Fix build errors of test cases
Mon, Mar 13, 5:56 PM
weimingz closed D30872: [Builtin][AArch64] Fix build errors of test cases by committing rL297697: [Builtin][AArch64] Fix build errors of test cases.
Mon, Mar 13, 5:56 PM
weimingz updated subscribers of D30872: [Builtin][AArch64] Fix build errors of test cases.
Mon, Mar 13, 3:24 PM
weimingz added reviewers for D30872: [Builtin][AArch64] Fix build errors of test cases: compnerd, jroelofs.
Mon, Mar 13, 3:23 PM

Sun, Mar 12

weimingz abandoned D30867: [Builtin][ARM] Try to address error on FreeBSD with r288777.
Sun, Mar 12, 12:23 AM
weimingz added a comment to D27309: builtins: Add ARM Thumb1 implementation for uidiv and uidivmod.

Most of the changes are guarded by __ARM_ARCH_ISA_THUMB == 1 and I reviewed again of the "else" part and they look OK except for one suspect:
https://reviews.llvm.org/D30867

No, unfortunately, _ _ARM_ARCH_ISA_THUMB == n can't be used as selector for Thumb1 (or Thumb2) code.
Value of _ _ARM_ARCH_ISA_THUMB isn't based on actual compilation mode (-mthumb, -marm), its based on given CPU (or arch) capabilities.
Thus, if we compile library with '-marm -march=armv6' then _ _ARM_ARCH_ISA_THUMB is set to '1'. So we ends with Thumb1 code compiled using ARM ISA. Not a nice result, right?
So D30867 cannot help us.

I found these problems:

  • Thumb[1][2] code selection is broken, "(_ _ARM_ARCH_ISA_THUMB == n && (defined(_ _THUMBEL_ _) || defined(_ _THUMBEB_ _))" is right condition. See: https://github.com/strejda/tegra/commit/91057bb46e54e350da87e354aed3189d469da458#diff-a8e5a4d82eadfcc89b4f54d6755a46b4L97

    This one is fatal for FreeBSD.
  • all Thumb1 and some Thumb2 functions are not properly decorated by DEFINE_COMPILERRT_THUMB_FUNCTION() This breaks debugging.
  • usage of '.thumb' directive is inconsistent across files
  • Thumb 1 version of __udivsi3 is broken and doesn't not work at all. See: ` cmp r0, r1, lsl IMM shift addhs r3, r3, IMM (1 << shift) subhs r0, r0, r1, lsl IMM shift ` and

    ` lsls r2, r1, IMM shift cmp r0, r2 blo 1f subs r0, r0, r2 1: adcs r3, r3 `
  • There is no Thumb1 variant of __udivmodsi4
Sun, Mar 12, 12:22 AM

Sat, Mar 11

weimingz created D30872: [Builtin][AArch64] Fix build errors of test cases.
Sat, Mar 11, 11:57 PM
weimingz updated the diff for D30867: [Builtin][ARM] Try to address error on FreeBSD with r288777.
Sat, Mar 11, 1:20 PM
weimingz committed rL297569: Revert "[Builtin] Implement lit-test support".
Revert "[Builtin] Implement lit-test support"
Sat, Mar 11, 1:05 PM
weimingz added a comment to D27309: builtins: Add ARM Thumb1 implementation for uidiv and uidivmod.

Most of the changes are guarded by __ARM_ARCH_ISA_THUMB == 1 and I reviewed again of the "else" part and they look OK except for one suspect:
https://reviews.llvm.org/D30867

Sat, Mar 11, 12:24 PM
weimingz created D30867: [Builtin][ARM] Try to address error on FreeBSD with r288777.
Sat, Mar 11, 12:21 PM
weimingz committed rL297566: [Builtin] Implement lit-test support.
[Builtin] Implement lit-test support
Sat, Mar 11, 11:53 AM
weimingz closed D30802: [Builtin] Implement lit-test support (part 1 of 2: test cases update) by committing rL297566: [Builtin] Implement lit-test support.
Sat, Mar 11, 11:53 AM

Fri, Mar 10

weimingz updated the diff for D30802: [Builtin] Implement lit-test support (part 1 of 2: test cases update).

Thanks for trying it on x86, Michal.
I XFAILed cpu_model_test.c and gcc_personality_test.c for now and I leave "FIXME" around the %RUN line. We can fix them later on.

Fri, Mar 10, 2:50 PM
weimingz committed rL297487: [Builtin][ARM] Fix test case for uldivmod.
[Builtin][ARM] Fix test case for uldivmod
Fri, Mar 10, 10:33 AM
weimingz closed D30811: [Builtin][ARM] Fix test case for uldivmod by committing rL297487: [Builtin][ARM] Fix test case for uldivmod.
Fri, Mar 10, 10:33 AM
weimingz updated the diff for D30802: [Builtin] Implement lit-test support (part 1 of 2: test cases update).

Address Jonathan's comments.
Just rebased and find that https://reviews.llvm.org/D30136 is adding TestCase support.
I'm not sure what's the TestCase is used for. Looks only for Darwin and the directory is empty.

Fri, Mar 10, 1:50 AM
weimingz added inline comments to D30802: [Builtin] Implement lit-test support (part 1 of 2: test cases update).
Fri, Mar 10, 1:43 AM
weimingz created D30811: [Builtin][ARM] Fix test case for uldivmod.
Fri, Mar 10, 12:15 AM

Thu, Mar 9

weimingz added a comment to D30802: [Builtin] Implement lit-test support (part 1 of 2: test cases update).

Unit/arm/call_apsr.S is updated to support thumb1.
It also fixes a bug in arm/aeabi_uldivmod_test.c

Mind fixing these in separate patches?

Thu, Mar 9, 11:45 PM
weimingz added a comment to D30802: [Builtin] Implement lit-test support (part 1 of 2: test cases update).

I tested it on ARM via QEMU with the CMAKE parames below:

Thu, Mar 9, 6:27 PM
weimingz created D30802: [Builtin] Implement lit-test support (part 1 of 2: test cases update).
Thu, Mar 9, 6:16 PM
weimingz abandoned D29980: [Builtin][ARM] Test script for ARM using QEMU.

will use lit-test

Thu, Mar 9, 6:07 PM

Tue, Mar 7

weimingz updated subscribers of D30724: Dont emit Mapping symbols for sections that contain only data..
Tue, Mar 7, 4:32 PM

Fri, Feb 24

weimingz added a comment to D30324: [ARM] Thumb2: favor R4-R7 over R12/LR in allocation order when opt for minsize.

Sure, I will get more numbers for other benchmarks.

Fri, Feb 24, 11:00 AM

Feb 23 2017

weimingz created D30324: [ARM] Thumb2: favor R4-R7 over R12/LR in allocation order when opt for minsize.
Feb 23 2017, 11:39 PM

Feb 22 2017

weimingz added a comment to D29980: [Builtin][ARM] Test script for ARM using QEMU.

Hi Renato,

Feb 22 2017, 6:05 PM

Feb 15 2017

weimingz committed rL295261: [Builtin][ARM] #ifdef ARM vfp tests and cpu_model_tests.
[Builtin][ARM] #ifdef ARM vfp tests and cpu_model_tests
Feb 15 2017, 4:11 PM
weimingz closed D29882: [Builtin][ARM] #ifdef ARM vfp tests and cpu_model_tests by committing rL295261: [Builtin][ARM] #ifdef ARM vfp tests and cpu_model_tests.
Feb 15 2017, 4:10 PM

Feb 14 2017

weimingz created D29980: [Builtin][ARM] Test script for ARM using QEMU.
Feb 14 2017, 11:12 PM

Feb 12 2017

weimingz created D29882: [Builtin][ARM] #ifdef ARM vfp tests and cpu_model_tests.
Feb 12 2017, 11:18 PM

Feb 11 2017

weimingz committed rL294886: [Builtin][ARM] Fix subsf3vfp for non-HF target.
[Builtin][ARM] Fix subsf3vfp for non-HF target
Feb 11 2017, 9:22 PM
weimingz closed D29869: [Builtin][ARM] Fix subsf3vfp for non-HF target by committing rL294886: [Builtin][ARM] Fix subsf3vfp for non-HF target.
Feb 11 2017, 9:22 PM
weimingz updated the diff for D29869: [Builtin][ARM] Fix subsf3vfp for non-HF target.
Feb 11 2017, 8:50 PM
weimingz created D29869: [Builtin][ARM] Fix subsf3vfp for non-HF target.
Feb 11 2017, 8:49 PM

Feb 5 2017

weimingz committed rL294172: [Builtin][ARM] Implement addsf3/__aeabi_fadd for Thumb1.
[Builtin][ARM] Implement addsf3/__aeabi_fadd for Thumb1
Feb 5 2017, 10:15 PM
weimingz closed D29485: [Builtin][ARM] Implement addsf3/__aeabi_fadd for Thumb1 by committing rL294172: [Builtin][ARM] Implement addsf3/__aeabi_fadd for Thumb1.
Feb 5 2017, 10:15 PM

Feb 3 2017

weimingz added a comment to D29485: [Builtin][ARM] Implement addsf3/__aeabi_fadd for Thumb1.

My previous comment of "136 bytes of stack usage" is inaccurate. I just find the default build doesn't have any -O flag. Is it an issue without a default -O flag?

Feb 3 2017, 11:45 PM

Feb 2 2017

weimingz created D29485: [Builtin][ARM] Implement addsf3/__aeabi_fadd for Thumb1.
Feb 2 2017, 10:52 PM
weimingz added a comment to D28526: [ARM] Add diagnostics when initialization global variables with ropi/rwpi.

ping ?

Feb 2 2017, 3:12 PM

Jan 30 2017

weimingz committed rL293527: [Bultin][ARM] Make aeabi_uldivmod and aeabi_ldivmod be Thumb1 compatible.
[Bultin][ARM] Make aeabi_uldivmod and aeabi_ldivmod be Thumb1 compatible
Jan 30 2017, 10:59 AM
weimingz closed D29226: [Bultin][ARM] Make aeabi_uldivmod and aeabi_ldivmod be Thumb1 compatible by committing rL293527: [Bultin][ARM] Make aeabi_uldivmod and aeabi_ldivmod be Thumb1 compatible.
Jan 30 2017, 10:59 AM

Jan 27 2017

weimingz updated the diff for D29226: [Bultin][ARM] Make aeabi_uldivmod and aeabi_ldivmod be Thumb1 compatible.

use movs

Jan 27 2017, 2:23 PM
weimingz added inline comments to D29226: [Bultin][ARM] Make aeabi_uldivmod and aeabi_ldivmod be Thumb1 compatible.
Jan 27 2017, 2:22 PM
weimingz created D29226: [Bultin][ARM] Make aeabi_uldivmod and aeabi_ldivmod be Thumb1 compatible.
Jan 27 2017, 10:59 AM

Jan 26 2017

weimingz committed rL293247: [Builtin][ARM] Add Thumb1 support for aeabi_c{f,d}cmp.S and dcmp.S.
[Builtin][ARM] Add Thumb1 support for aeabi_c{f,d}cmp.S and dcmp.S
Jan 26 2017, 5:32 PM
weimingz closed D28985: [Builtin][ARM] Add Thumb1 support for aeabi_c{f,d}cmp.S and dcmp.S by committing rL293247: [Builtin][ARM] Add Thumb1 support for aeabi_c{f,d}cmp.S and dcmp.S.
Jan 26 2017, 5:32 PM
weimingz added a comment to D28985: [Builtin][ARM] Add Thumb1 support for aeabi_c{f,d}cmp.S and dcmp.S.

I run the tests under compiler-rt/test/builtins/Unit/arm

Jan 26 2017, 1:12 AM
weimingz updated the diff for D28985: [Builtin][ARM] Add Thumb1 support for aeabi_c{f,d}cmp.S and dcmp.S.

using lsls to indirectly set PSR flags

Jan 26 2017, 1:11 AM

Jan 23 2017

weimingz added a reviewer for D28526: [ARM] Add diagnostics when initialization global variables with ropi/rwpi: rsmith.
Jan 23 2017, 12:39 PM
weimingz updated the diff for D28526: [ARM] Add diagnostics when initialization global variables with ropi/rwpi.

As Eli sugguested, it's better to check it in Sema. In order to access RelocationModel in Sema, we moved it from CodeGenOpts to LangOpts

Jan 23 2017, 12:38 PM

Jan 21 2017

weimingz created D28985: [Builtin][ARM] Add Thumb1 support for aeabi_c{f,d}cmp.S and dcmp.S.
Jan 21 2017, 4:33 PM
weimingz committed rL292727: [Bultin][ARM] Make aeabi_memset be Thumb1 compatible and other asm.
[Bultin][ARM] Make aeabi_memset be Thumb1 compatible and other asm
Jan 21 2017, 10:36 AM
weimingz closed D28971: [Bultin][ARM] Make aeabi_memset be Thumb1 compatible by committing rL292727: [Bultin][ARM] Make aeabi_memset be Thumb1 compatible and other asm.
Jan 21 2017, 10:36 AM

Jan 20 2017

weimingz added a comment to D28463: [Builtin] [ARM] Update CMake to support the build of armv6m.

I included the fix in https://reviews.llvm.org/D28971

Jan 20 2017, 1:51 PM
weimingz created D28971: [Bultin][ARM] Make aeabi_memset be Thumb1 compatible.
Jan 20 2017, 1:50 PM

Jan 19 2017

weimingz committed rL292504: [Builtin] [ARM] Update CMake to support the build of armv6m.
[Builtin] [ARM] Update CMake to support the build of armv6m
Jan 19 2017, 10:57 AM
weimingz closed D28463: [Builtin] [ARM] Update CMake to support the build of armv6m by committing rL292504: [Builtin] [ARM] Update CMake to support the build of armv6m.
Jan 19 2017, 10:57 AM

Jan 18 2017

weimingz added inline comments to D28463: [Builtin] [ARM] Update CMake to support the build of armv6m.
Jan 18 2017, 10:08 AM

Jan 11 2017

weimingz added inline comments to D28463: [Builtin] [ARM] Update CMake to support the build of armv6m.
Jan 11 2017, 11:42 PM
weimingz updated the diff for D28463: [Builtin] [ARM] Update CMake to support the build of armv6m.
Jan 11 2017, 3:27 PM
weimingz committed rL291687: [zorg] Add Polly builder for ARM target.
[zorg] Add Polly builder for ARM target
Jan 11 2017, 10:38 AM
weimingz closed D28493: [zorg] Add Polly builder for ARM target by committing rL291687: [zorg] Add Polly builder for ARM target.
Jan 11 2017, 10:38 AM

Jan 10 2017

weimingz added a comment to D28526: [ARM] Add diagnostics when initialization global variables with ropi/rwpi.

Hi Eli,
Thanks for the comments!
I though of implementation in Sema and I actually experimented a little bit. Then it seemed that the CodeGenOpts is only available in the CGM. Any ideas?

Jan 10 2017, 2:50 PM
weimingz added a comment to D28016: [Builtins] [ARM] Adding Thumb1 support for fcmp.

Ugh, I missed them in during clean up in diff 2. Very sorry!

Jan 10 2017, 12:15 PM
weimingz retitled D28526: [ARM] Add diagnostics when initialization global variables with ropi/rwpi from to [ARM] Add diagnostics when initialization global variables with ropi/rwpi.
Jan 10 2017, 12:09 PM

Jan 8 2017

weimingz retitled D28463: [Builtin] [ARM] Update CMake to support the build of armv6m from to [Builtin] [ARM] Update CMake to support the build of armv6m.
Jan 8 2017, 10:45 PM
weimingz committed rL291396: [Builtins] [ARM] Adding Thumb1 support for fcmp.
[Builtins] [ARM] Adding Thumb1 support for fcmp
Jan 8 2017, 11:02 AM
weimingz closed D28016: [Builtins] [ARM] Adding Thumb1 support for fcmp by committing rL291396: [Builtins] [ARM] Adding Thumb1 support for fcmp.
Jan 8 2017, 11:02 AM

Jan 7 2017

weimingz added a comment to D28016: [Builtins] [ARM] Adding Thumb1 support for fcmp.

I can fix the comments

Jan 7 2017, 1:11 AM

Jan 5 2017

weimingz added a comment to D28016: [Builtins] [ARM] Adding Thumb1 support for fcmp.

Manually ran the unit test and passed

Jan 5 2017, 10:52 AM

Dec 28 2016

weimingz updated the diff for D28016: [Builtins] [ARM] Adding Thumb1 support for fcmp.

Missed a format issue in previous upload. Sorry~

Dec 28 2016, 12:37 AM
weimingz added inline comments to D28016: [Builtins] [ARM] Adding Thumb1 support for fcmp.
Dec 28 2016, 12:32 AM
weimingz added inline comments to D28016: [Builtins] [ARM] Adding Thumb1 support for fcmp.
Dec 28 2016, 12:23 AM
weimingz updated the diff for D28016: [Builtins] [ARM] Adding Thumb1 support for fcmp.

By tracking the original implementation, I think we can avoid the msr/mrs. Also address some formatting issues.

Dec 28 2016, 12:20 AM

Dec 22 2016

weimingz added a comment to D28016: [Builtins] [ARM] Adding Thumb1 support for fcmp.

Hi Renato,

Dec 22 2016, 5:18 PM

Dec 21 2016

weimingz added a comment to D27898: [compiler-rt] [builtins] Implement __floattitf() & __floatuntitf().

The patch looks good to me.

Dec 21 2016, 10:52 AM
weimingz added a comment to D27898: [compiler-rt] [builtins] Implement __floattitf() & __floatuntitf().

Thanks for the formatting. Regarding the refactoring, Regarding factoring out common code, I think it's OK to do it in a follow-up patch. For readability, it should be OK. For example, fp_add_impl.inc is used by float, double and long double.

Dec 21 2016, 10:49 AM