Page MenuHomePhabricator
Feed Advanced Search

Yesterday

abidh accepted D102049: [BareMetal] Ensure that sysroot always comes after library paths.

LGTM

Fri, May 7, 2:46 AM · Restricted Project
abidh added a comment to D92677: Provide default location of sysroot for Baremetal toolchain..

If gcc and clang based toolchains are installed in the same prefix then having sysroot at same location can cause one installation to overwrite parts of other.

Fri, May 7, 2:40 AM · Restricted Project

Mar 8 2021

abidh added a comment to D98113: [Driver] Also search FilePaths for compiler-rt before falling back.

One thing that is currently rather ugly about BareMetal is that it ignores the AddArch argument. Once you have a sysroot, the architecture suffix is rather unnecessary, and given compiler-rt uses LLVM_ENABLE_PER_TARGET_RUNTIME_DIR to decide both whether to add a suffix and whether to add lib/${OS} to the install path, that means you can't nicely point compiler-rt at the sysroot as the install directory (well, unless you do something like make COMPILER_RT_OUTPUT_DIR point at the sysroot not the libdir and set COMPILER_RT_OS_DIR to . (or maybe the empty string also works)).

Mar 8 2021, 3:42 AM · Restricted Project

Feb 11 2021

abidh committed rG60bed4ab57d5: Replace deprecated %T in 2 tests. (authored by abidh).
Replace deprecated %T in 2 tests.
Feb 11 2021, 2:22 PM
abidh closed D93023: Replace deprecated %T in 2 tests..
Feb 11 2021, 2:21 PM · Restricted Project
abidh updated the diff for D93023: Replace deprecated %T in 2 tests..

Changes in this version.

  1. Added an explicit --sysroot argument.
  2. Shortened "testroot-riscv{len}-baremetal-nogcc" string
Feb 11 2021, 6:03 AM · Restricted Project

Jan 28 2021

abidh committed rG70ea15b88953: [MC][ELF] Fix accepting abbreviated form with sh_flags and sh_entsize (authored by burnus).
[MC][ELF] Fix accepting abbreviated form with sh_flags and sh_entsize
Jan 28 2021, 7:01 AM
abidh closed D94072: [MC][ELF] Fix accepting abbreviated form with sh_flags and sh_entsize.
Jan 28 2021, 7:01 AM · Restricted Project

Dec 21 2020

abidh committed rG43def795aacd: Update references to 'master' branch. (authored by abidh).
Update references to 'master' branch.
Dec 21 2020, 11:12 AM
abidh closed D92831: Update references to 'master' branch..
Dec 21 2020, 11:11 AM · Restricted Project
abidh updated the diff for D92831: Update references to 'master' branch..

Rebase.

Dec 21 2020, 11:05 AM · Restricted Project

Dec 14 2020

abidh committed rG670686ad8ecc: Add initial support for multilibs in Baremetal toolchain. (authored by abidh).
Add initial support for multilibs in Baremetal toolchain.
Dec 14 2020, 1:00 PM
abidh closed D93138: Add initial support for multilibs in Baremetal toolchain..
Dec 14 2020, 1:00 PM · Restricted Project
abidh updated the diff for D93138: Add initial support for multilibs in Baremetal toolchain..

Handle review comments.

Dec 14 2020, 10:41 AM · Restricted Project
abidh added a comment to D93023: Replace deprecated %T in 2 tests..

It seems that testcase I added has brought to surface a hidden issue. If you
look at the end of Generic_GCC::GCCInstallationDetector::AddDefaultGCCPrefixes,
it adds sysroot/usr to the Prefixes. If the sysroot is empty, this will end up
using the toolchain that you installed in /usr.

Dec 14 2020, 5:59 AM · Restricted Project

Dec 11 2020

abidh requested review of D93138: Add initial support for multilibs in Baremetal toolchain..
Dec 11 2020, 11:45 AM · Restricted Project
abidh added a comment to D92052: [MC][ELF] Accept abbreviated form with sh_flags and sh_entsize.

Committed in 1deff4009e0a on request of @burnus.

Dec 11 2020, 8:49 AM · Restricted Project
abidh committed rG1deff4009e0a: [MC][ELF] Accept abbreviated form with sh_flags and sh_entsize (authored by burnus).
[MC][ELF] Accept abbreviated form with sh_flags and sh_entsize
Dec 11 2020, 8:46 AM
abidh closed D92052: [MC][ELF] Accept abbreviated form with sh_flags and sh_entsize.
Dec 11 2020, 8:46 AM · Restricted Project

Dec 10 2020

abidh added a comment to D93023: Replace deprecated %T in 2 tests..

If you do this, testroot-riscv64-baremetal-nogcc/ is probably also not useful (or you can replace it with a shorter string`.

Can you fix the tests when gcc-riscv64-linux-gnu is installed?

Dec 10 2020, 12:53 PM · Restricted Project
abidh updated the diff for D92831: Update references to 'master' branch..

Remove an unintended change.

Dec 10 2020, 4:22 AM · Restricted Project
abidh added inline comments to D92831: Update references to 'master' branch..
Dec 10 2020, 4:20 AM · Restricted Project
abidh added a comment to D91442: [clang][Driver] Handle risvc in Baremetal.cpp..

This change has been failing on my machine for the past two weeks.

riscv32-toolchain-extra.c and riscv64-toolchain-extra.c are not hermit. I have installed /usr/lib/gcc-cross/riscv64-linux-gnu/10 (gcc-10-riscv64-linux-gnu and its dependencies) on my machine and the test will find some directories relative to /usr/lib/gcc-cross/riscv64-linux-gnu/10. I think --sysroot is required for such tests.

%T is a deprecated lit feature. Please do something like rm -rf %t; mkdir %t instead.

Dec 10 2020, 4:09 AM · Restricted Project
abidh requested review of D93023: Replace deprecated %T in 2 tests..
Dec 10 2020, 4:06 AM · Restricted Project

Dec 9 2020

abidh updated the diff for D92831: Update references to 'master' branch..

Updated other instances in llvm/docs. I have initially updated the whole tree but that becomes quite a big patch. I can post that one if it is of interest.

Dec 9 2020, 4:08 PM · Restricted Project
abidh added a comment to D92831: Update references to 'master' branch..

Thanks for this.
The proposed changes all LGTM.
I did do a grep on the term 'master' in llvm/docs, and found quite a few more uses of 'master', especially in links.
The command I used was: grep -R master llvm/docs/
Just two examples are:

llvm/docs/CodingStandards.rst:<https://github.com/llvm/llvm-project/tree/master/llvm/include/llvm/ADT>`_)
llvm/docs/GitBisecting.rst:being able to reset, do the usual ``git checkout -f master; git reset --hard

Would you also be willing to adapt/fix the URLs pointing to llvm-project in that directory?

Thanks,

Kristof

Dec 9 2020, 2:51 PM · Restricted Project

Dec 8 2020

abidh requested review of D92831: Update references to 'master' branch..
Dec 8 2020, 4:00 AM · Restricted Project
abidh committed rGdeec343bfd85: [compiler-rt] Allow appending to 'target_cflags' value from lit_config. (authored by abidh).
[compiler-rt] Allow appending to 'target_cflags' value from lit_config.
Dec 8 2020, 3:49 AM
abidh closed D91783: [compiler-rt] Allow appending to 'target_cflags' value from lit_config..
Dec 8 2020, 3:49 AM · Restricted Project

Dec 7 2020

abidh updated the diff for D91783: [compiler-rt] Allow appending to 'target_cflags' value from lit_config..

Addressed review comments.

Dec 7 2020, 2:04 PM · Restricted Project
abidh committed rG275592e71413: Provide default location of sysroot for Baremetal toolchain. (authored by abidh).
Provide default location of sysroot for Baremetal toolchain.
Dec 7 2020, 1:28 AM
abidh closed D92677: Provide default location of sysroot for Baremetal toolchain..
Dec 7 2020, 1:27 AM · Restricted Project

Dec 4 2020

abidh added inline comments to D92677: Provide default location of sysroot for Baremetal toolchain..
Dec 4 2020, 1:31 PM · Restricted Project
abidh updated the diff for D92677: Provide default location of sysroot for Baremetal toolchain..

Handled review comments.

Dec 4 2020, 1:29 PM · Restricted Project
abidh requested review of D92677: Provide default location of sysroot for Baremetal toolchain..
Dec 4 2020, 11:45 AM · Restricted Project
abidh committed rGca2888310b24: Don't use sysroot/include when sysroot is empty. (authored by abidh).
Don't use sysroot/include when sysroot is empty.
Dec 4 2020, 10:34 AM
abidh closed D92176: Don't use sysroot/include when sysroot is empty..
Dec 4 2020, 10:34 AM · Restricted Project
abidh added a comment to D91783: [compiler-rt] Allow appending to 'target_cflags' value from lit_config..

ping.

Dec 4 2020, 9:26 AM · Restricted Project
abidh added a comment to D92176: Don't use sysroot/include when sysroot is empty..

@jroelofs Do you have any comments on this patch?

Dec 4 2020, 9:23 AM · Restricted Project

Nov 26 2020

abidh requested review of D92176: Don't use sysroot/include when sysroot is empty..
Nov 26 2020, 6:26 AM · Restricted Project
abidh committed rG45ba2392d7e0: [clang][Driver] Handle risvc in Baremetal.cpp. (authored by abidh).
[clang][Driver] Handle risvc in Baremetal.cpp.
Nov 26 2020, 3:44 AM
abidh closed D91442: [clang][Driver] Handle risvc in Baremetal.cpp..
Nov 26 2020, 3:44 AM · Restricted Project

Nov 24 2020

abidh added a comment to D91442: [clang][Driver] Handle risvc in Baremetal.cpp..

Hi @lenary,
Do you any more comments on the patch?

Nov 24 2020, 4:58 AM · Restricted Project

Nov 19 2020

abidh requested review of D91783: [compiler-rt] Allow appending to 'target_cflags' value from lit_config..
Nov 19 2020, 4:35 AM · Restricted Project

Nov 18 2020

abidh updated the diff for D91442: [clang][Driver] Handle risvc in Baremetal.cpp..

This update contains following changes.

Nov 18 2020, 12:08 PM · Restricted Project
abidh committed rG8cdc53887387: Add sysroot/lib to library search path of baremetal toolchain. (authored by abidh).
Add sysroot/lib to library search path of baremetal toolchain.
Nov 18 2020, 4:41 AM
abidh closed D91559: Add sysroot/lib to library search path of baremetal toolchain..
Nov 18 2020, 4:41 AM · Restricted Project
abidh added inline comments to D91559: Add sysroot/lib to library search path of baremetal toolchain..
Nov 18 2020, 3:38 AM · Restricted Project
abidh updated the diff for D91559: Add sysroot/lib to library search path of baremetal toolchain..

Handle review comment.

Nov 18 2020, 3:35 AM · Restricted Project

Nov 17 2020

abidh added a comment to D91442: [clang][Driver] Handle risvc in Baremetal.cpp..

I recall that there is also https://reviews.llvm.org/D68407 which iirc hoped to address using RISCVToolchain with Compiler-rt and libunwind - presumably it is not a complete solution, but it might be we want to use some checking of the GCCInstallation (like RISCVToolChain::GetDefaultRuntimeLibType does) to choose which toolchain to instantiate? I'm not sure if we can satisfy that ordering though.

Nov 17 2020, 8:54 AM · Restricted Project
abidh added a comment to D91442: [clang][Driver] Handle risvc in Baremetal.cpp..

I'm worried about this change - I *think* it doesn't cover the existing behaviour of a baremetal GCC toolchain being installed into the same prefix as clang, and clang automatically picking up that baremetal gcc toolchain. What should we expect to do here? This is especially an issue if you're trying to make a relocatable toolchain tarball, where specifying --gcc-toolchain automatically is difficult.

Would it be possible to use a relative path with --gcc-toolchain then this can be checked in either RISCVToolChain.cpp or GNU.cpp and adjusted accordingly?

The GCC toolchain, when given a relative path, already interprets it relative to the working directory the compiler was invoked from, not the directory the compiler is located in, iirc.

I dont think path is made absolute relative using working directory. What is happening is that if (!VFS.exists(Prefix)) call in the following line will succeed if the path existed relative to working directory. This seems accidental to me.

https://github.com/llvm/llvm-project/blob/5a9f3867046c4e1c97760e22a505f4d1d788417e/clang/lib/Driver/ToolChains/Gnu.cpp#L1947

I tried a small change to turn a relative --gcc-toolchain into absolute using the compiler installed path and it works ok. If this is something that works for you then I can post a patch.

Relative paths should be relative to the current working directory. That is what everyone expects and is what every other argument does (and see = and $SYSROOT for how GCC and compatible drivers get around that in cases like -I).

Nov 17 2020, 8:31 AM · Restricted Project
abidh added a comment to D91442: [clang][Driver] Handle risvc in Baremetal.cpp..

I'm worried about this change - I *think* it doesn't cover the existing behaviour of a baremetal GCC toolchain being installed into the same prefix as clang, and clang automatically picking up that baremetal gcc toolchain. What should we expect to do here? This is especially an issue if you're trying to make a relocatable toolchain tarball, where specifying --gcc-toolchain automatically is difficult.

Would it be possible to use a relative path with --gcc-toolchain then this can be checked in either RISCVToolChain.cpp or GNU.cpp and adjusted accordingly?

The GCC toolchain, when given a relative path, already interprets it relative to the working directory the compiler was invoked from, not the directory the compiler is located in, iirc.

Nov 17 2020, 6:15 AM · Restricted Project
abidh added a comment to D91442: [clang][Driver] Handle risvc in Baremetal.cpp..

I'm worried about this change - I *think* it doesn't cover the existing behaviour of a baremetal GCC toolchain being installed into the same prefix as clang, and clang automatically picking up that baremetal gcc toolchain. What should we expect to do here? This is especially an issue if you're trying to make a relocatable toolchain tarball, where specifying --gcc-toolchain automatically is difficult.

Nov 17 2020, 3:40 AM · Restricted Project

Nov 16 2020

abidh added a comment to D91442: [clang][Driver] Handle risvc in Baremetal.cpp..

Seems reasonable.

I could see someone wanting to use --gcc-toolchain to point at the baremetal toolchain for their target, but that's unlikely to work out of the box anyway. I'd love to know where the Generic_GCC toolchain is used in practice, since that's always seemed quite fragile to me.

Nov 16 2020, 12:14 PM · Restricted Project
abidh updated the diff for D91442: [clang][Driver] Handle risvc in Baremetal.cpp..

Made the condition consistent in both places where Baremetal toolchain is instantiated as suggested in review.

Nov 16 2020, 12:13 PM · Restricted Project
abidh requested review of D91559: Add sysroot/lib to library search path of baremetal toolchain..
Nov 16 2020, 12:07 PM · Restricted Project

Nov 13 2020

abidh added a comment to D91442: [clang][Driver] Handle risvc in Baremetal.cpp..

We use pure LLVM toolchains so improving support for that out of the box is good in my books. However, I do worry this is going to cause friction for a lot of people using LLVM for RISC-V; my understanding is that most use LLVM with a GNU sysroot and binutils, and so this looks like it will break their setups. Is there anything that can be done to automatically detect such cases? What does Arm do here?

Nov 13 2020, 10:10 AM · Restricted Project
abidh requested review of D91442: [clang][Driver] Handle risvc in Baremetal.cpp..
Nov 13 2020, 9:49 AM · Restricted Project

Oct 22 2020

abidh added a comment to D89040: [libcxx] Allow checking for newlib without using _NEWLIB_VERSION..
Oct 22 2020, 3:07 AM · Unknown Object (Project)

Oct 21 2020

abidh committed rG272279a1c0fa: [libcxxabi] Stub out 'sleep' call when _LIBCXXABI_HAS_NO_THREADS is defined. (authored by abidh).
[libcxxabi] Stub out 'sleep' call when _LIBCXXABI_HAS_NO_THREADS is defined.
Oct 21 2020, 12:59 PM
abidh closed D89871: [libcxxabi] Stub out 'sleep' call when _LIBCXXABI_HAS_NO_THREADS is defined..
Oct 21 2020, 12:59 PM · Restricted Project
abidh requested review of D89871: [libcxxabi] Stub out 'sleep' call when _LIBCXXABI_HAS_NO_THREADS is defined..
Oct 21 2020, 4:27 AM · Restricted Project
abidh added a comment to D89040: [libcxx] Allow checking for newlib without using _NEWLIB_VERSION..

ping.

Oct 21 2020, 4:06 AM · Unknown Object (Project)

Oct 13 2020

abidh resigned from D39969: Set error status in ObjectFile::LoadInMemory if it is not set .
Oct 13 2020, 1:09 PM
abidh committed rGeddbadfe13fb: [compiler-rt] Allow override of 'emulator' value from lit_config. (authored by abidh).
[compiler-rt] Allow override of 'emulator' value from lit_config.
Oct 13 2020, 9:15 AM
abidh closed D84708: [compiler-rt] Allow override of 'emulator' value from lit_config..
Oct 13 2020, 9:15 AM · Restricted Project

Oct 11 2020

abidh updated the diff for D84708: [compiler-rt] Allow override of 'emulator' value from lit_config..

Updated the comments and summary message as suggested in the review.

Oct 11 2020, 1:15 PM · Restricted Project

Oct 9 2020

abidh added a comment to D84708: [compiler-rt] Allow override of 'emulator' value from lit_config..

@abidh Can you explain why this is needed? The emulator is set at CMake configure time and its value depends on the target being tested. Why do you want to override this with a value from the lit_config object?

Oct 9 2020, 2:09 AM · Restricted Project

Oct 8 2020

abidh added a reviewer for D84708: [compiler-rt] Allow override of 'emulator' value from lit_config.: delcypher.
Oct 8 2020, 7:59 AM · Restricted Project
abidh resigned from D12968: Fix for lldb-mi crash in Listener code if -exec-abort MI command was invoked without getting process stopped.
Oct 8 2020, 6:26 AM
abidh resigned from D26124: [LLDB-MI] Escape MI output in a more consistent manner.
Oct 8 2020, 6:26 AM
abidh requested review of D89040: [libcxx] Allow checking for newlib without using _NEWLIB_VERSION..
Oct 8 2020, 6:10 AM · Unknown Object (Project)

Oct 6 2020

abidh accepted D88825: [libc++] Check _LIBCPP_USE_CLOCK_GETTIME before using clock_gettime.
Oct 6 2020, 2:46 AM · Unknown Object (Project)

Oct 5 2020

abidh requested review of D88825: [libc++] Check _LIBCPP_USE_CLOCK_GETTIME before using clock_gettime.
Oct 5 2020, 4:52 AM · Unknown Object (Project)

Sep 15 2020

abidh abandoned D86920: [libcxxabi] Provide options to set compiler/link flags for test programs..
Sep 15 2020, 5:27 AM · Restricted Project
abidh added a comment to D86920: [libcxxabi] Provide options to set compiler/link flags for test programs..

Please take a look at libcxx/test/configs/libcxx-trunk-shared.cfg.in and LIBCXX_TEST_CONFIG in CMake for how to customize exactly how you're running the test suite. This is a lot more powerful and simple than stringing options through CMake!

Sep 15 2020, 1:38 AM · Restricted Project

Sep 1 2020

abidh requested review of D86920: [libcxxabi] Provide options to set compiler/link flags for test programs..
Sep 1 2020, 2:28 AM · Restricted Project

Aug 31 2020

abidh added a comment to D84708: [compiler-rt] Allow override of 'emulator' value from lit_config..

Ping.

Aug 31 2020, 11:51 PM · Restricted Project

Aug 25 2020

abidh added a comment to D86540: [libcxxabi,libunwind] support running tests in standalone mode.

We require this patch for our downstream baremetal target to be able to run the test suites of both libraries on our target.

I'm not sure whether the check in libcxxabi was simply outdated or if we will require some type of check there.

I also maintain a downstream baremetal target and have a similar local change to side step this check. Although I did not remove it entirely as I was not sure what it does and instead used NOT LIBCXXABI_BAREMETAL. Anyways, It will be nice to have this fixed upstream.

Aug 25 2020, 7:51 AM · Unknown Object (Project), Restricted Project, Restricted Project

Jul 29 2020

abidh committed rG380fee34d279: [libunwind] Provide a way to set '_LIBUNWIND_IS_BAREMETAL' through cmake. (authored by abidh).
[libunwind] Provide a way to set '_LIBUNWIND_IS_BAREMETAL' through cmake.
Jul 29 2020, 4:05 AM
abidh closed D84759: [libunwind] Provide a way to set '_LIBUNWIND_IS_BAREMETAL' through cmake..
Jul 29 2020, 4:05 AM · Restricted Project, Restricted Project
abidh added inline comments to D84759: [libunwind] Provide a way to set '_LIBUNWIND_IS_BAREMETAL' through cmake..
Jul 29 2020, 4:04 AM · Restricted Project, Restricted Project
abidh updated the diff for D84759: [libunwind] Provide a way to set '_LIBUNWIND_IS_BAREMETAL' through cmake..

Handled review comments.

Jul 29 2020, 4:04 AM · Restricted Project, Restricted Project

Jul 28 2020

abidh committed rG1f166edeb47e: [lld][linkerscript] Fix handling of DEFINED. (authored by abidh).
[lld][linkerscript] Fix handling of DEFINED.
Jul 28 2020, 1:19 PM
abidh closed D83758: [lld][linkerscript] Fix handling of DEFINED..
Jul 28 2020, 1:19 PM · Restricted Project
abidh requested review of D84759: [libunwind] Provide a way to set '_LIBUNWIND_IS_BAREMETAL' through cmake..
Jul 28 2020, 8:00 AM · Restricted Project, Restricted Project

Jul 27 2020

Herald added a project to D84708: [compiler-rt] Allow override of 'emulator' value from lit_config.: Restricted Project.
Jul 27 2020, 4:03 PM · Restricted Project

Jul 15 2020

abidh updated the diff for D83758: [lld][linkerscript] Fix handling of DEFINED..

Moved test to linkerscript/define.test as advised.

Jul 15 2020, 11:07 AM · Restricted Project

Jul 14 2020

Herald added a project to D83758: [lld][linkerscript] Fix handling of DEFINED.: Restricted Project.
Jul 14 2020, 3:28 AM · Restricted Project

Jul 10 2020

abidh updated the diff for D83244: [lld] Don't error out on relocations in .gcc_except_table to discarded sections..

I have removed the .eh_frame. I have looked a bit more into it. It seems that riscv target does create relocations in .gcc_except_table. The following commit gives some background on its encoding.
https://reviews.llvm.org/rGab009a602e96b238000d9e20e5c54b078d08aad3

Jul 10 2020, 11:08 AM · Restricted Project

Jul 7 2020

abidh added a comment to D83244: [lld] Don't error out on relocations in .gcc_except_table to discarded sections..

The .eh_frame test case is invalid. LLD handles .eh_frame input sections differently. It parses .eh_frame and deduplicates them. See eh-frame-merge.s, an input .eh_frame referencing a non-prevailing COMDAT group is dropped (EhFrameSection::isFdeLive)

Do you have a realistic case where LLD erroneously errors? If so, can you get a minimal reproduce, use LLD_REPRODUCE=/tmp/rep.tar or -Wl,--reproduce=/tmp/rep.tar to get a reproduce file and upload it somewhere?

Jul 7 2020, 2:03 AM · Restricted Project

Jul 6 2020

Herald added a project to D83244: [lld] Don't error out on relocations in .gcc_except_table to discarded sections.: Restricted Project.
Jul 6 2020, 11:10 AM · Restricted Project

Nov 22 2019

abidh added inline comments to D68362: [libunwind][RISCV] Add 64-bit RISC-V support.
Nov 22 2019, 3:01 AM · Unknown Object (Project)

Sep 5 2019

abidh committed rL371070: Request commit access for abidh..
Request commit access for abidh.
Sep 5 2019, 7:00 AM

Mar 25 2019

abidh accepted D59015: [lldb-mi] Include full path in the -data-disassemble response.

Looks ok but I would like a testcase to go with the change.

Mar 25 2019, 4:40 AM · Restricted Project, Restricted Project
abidh committed rLLDB356876: Fix a broken comment line. NFC..
Fix a broken comment line. NFC.
Mar 25 2019, 2:44 AM
abidh committed rGde9d73649561: Fix a broken comment line. NFC. (authored by abidh).
Fix a broken comment line. NFC.
Mar 25 2019, 2:41 AM
abidh committed rL356876: Fix a broken comment line. NFC..
Fix a broken comment line. NFC.
Mar 25 2019, 2:41 AM

Feb 25 2019

abidh accepted D55653: [lldb-mi] Check raw pointers before passing them to std::string ctor/assignment.

The lldb-mi bits look ok to me.

Feb 25 2019, 3:57 AM · Restricted Project

Nov 15 2017

abidh added inline comments to D39969: Set error status in ObjectFile::LoadInMemory if it is not set .
Nov 15 2017, 2:59 AM